ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » problem using REFERENCE

Post new topic  Reply to topic
 problem using REFERENCE « View previous topic :: View next topic » 
Author Message
pfaulkner
PostPosted: Thu Oct 16, 2003 11:25 am    Post subject: problem using REFERENCE Reply with quote

Master

Joined: 18 Mar 2002
Posts: 241
Location: Colorado, USA

Does anyone know if this ESQL is correct, my output message seems to be corrupt. I've tried removing the PROCEDURE's and still get the same problem so it appears to be an issue with REFERENCE. If I remove the reference code and the procedures my output looks as excepted.

My input message is XML.

DECLARE C INTEGER;
SET C = CARDINALITY(InputRoot.*[]);
DECLARE I INTEGER;
SET I = 1;
WHILE I < C DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I=I+1;
END WHILE;
SET OutputRoot.Properties.MessageSet = 'DU543NS07K001';
SET OutputRoot.Properties.MessageType = 'MRMBLOB';
-- Enter SQL below this line. SQL above this line might be regenerated, causing any modifications to be lost.
DECLARE InBody REFERENCE TO InputBody.MRMBLOB;
DECLARE OutRoot REFERENCE TO OutputRoot;

CALL BuildSegment1(InBody, OutRoot);
CALL BuildSegment2(InBody, OutRoot);

SET OutputRoot.Properties.MessageFormat = 'CWF';

CREATE PROCEDURE BuildSegment1(IN InBody REFERENCE, INOUT OutRoot REFERENCE)
BEGIN
SET "OutRoot"."MRM"."SEGMENTCOUNT" = 1;
SET "OutRoot"."MRM"."MRM1"."field2" = InBody.MRMBLOB."field2";
SET "OutRoot"."MRM"."MRM1"."field1" = '12345';
END;

CREATE PROCEDURE BuildSegment2(IN InBody REFERENCE, INOUT OutRoot REFERENCE)
BEGIN
SET "OutRoot"."MRM"."SEGMENT2COUNT" = 1;
SET "OutRoot"."MRM"."MRM2"."field2" = '2';
END;
Back to top
View user's profile Send private message AIM Address
Missam
PostPosted: Fri Oct 17, 2003 4:58 am    Post subject: Reply with quote

Chevalier

Joined: 16 Oct 2003
Posts: 424

Hi,
The Problem with your ESQL statements is

DECLARE OutRoot REFERENCE TO OutputRoot;

In the above statement you are referencing to OutputRoot tree which is not existing.you can nitice this by turning on your user trace debugging.
try removing that line and replacing OutputRoot where ever OutRoot is or try creating the fields before REFERENCING them.
Thanx
sam
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Fri Oct 17, 2003 6:01 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

IamSam wrote:
Hi,
The Problem with your ESQL statements is

DECLARE OutRoot REFERENCE TO OutputRoot;

In the above statement you are referencing to OutputRoot tree which is not existing.


I don't think that's true, nor the problem. His reference statement occurs after the code to copy the headers has been executed. That means that the OutputRoot tree has already been created and partially filled in.

I think pfaulker is having another varient on the problem discussed here, that he was having while trying to use references to copy the Properties tree.

That is, he's not creating OutputRoot.MRM properly, because he's using a reference to set all it's fields, and the parser is not getting properly attached to the MRM tree.

At least, at a guess without more information.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
pfaulkner
PostPosted: Fri Oct 17, 2003 7:56 am    Post subject: Reply with quote

Master

Joined: 18 Mar 2002
Posts: 241
Location: Colorado, USA

thank you thank you thank you Jeff

I added the following code and it fixed all my problems

/*Create the XML Parser before we use it*/
CREATE LASTCHILD OF OutputRoot DOMAIN 'MRM';
Back to top
View user's profile Send private message AIM Address
jefflowrey
PostPosted: Fri Oct 17, 2003 9:43 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

pfaulkner wrote:
thank you thank you thank you Jeff

Don't thank me. Thank Brandon.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » problem using REFERENCE
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.