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 » New to References

Post new topic  Reply to topic
 New to References « View previous topic :: View next topic » 
Author Message
EnOne
PostPosted: Tue May 10, 2005 11:12 am    Post subject: New to References Reply with quote

Centurion

Joined: 09 Oct 2002
Posts: 100
Location: Kansas City

I was trying out using REFERENCE in my message flows to increase performance I had no problems using the REFERENCE for input. For example a simple message copy.

--message headers
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
--
DECLARE InputMsg REFERENCE TO InputRoot.XML.XMLMessage;
SET OutputRoot.XML.XMLSvc = InputMsg;


where I started to have problems was using REFERENCE with output like so...

--message headers
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
--
DECLARE OutputMsg REFERENCE TO OutputRoot.XML.XMLMessage;
SET OutputMsg = InputRoot.XML.XMLMessage;

when I use the above code nothing is transfered to the XML tree. Can anyone please Help. I am using WBIMB V5 CSD(most recent) with MQ 5.3 running on AIX.
Back to top
View user's profile Send private message
JT
PostPosted: Tue May 10, 2005 11:38 am    Post subject: Reply with quote

Padawan

Joined: 27 Mar 2003
Posts: 1564
Location: Hartford, CT.

Before you can establish a REFERENCE pointer, the element must exist.

Code:
CREATE FIELD OutputRoot.XML.XMLMessage;
Back to top
View user's profile Send private message
EnOne
PostPosted: Tue May 10, 2005 12:09 pm    Post subject: Reply with quote

Centurion

Joined: 09 Oct 2002
Posts: 100
Location: Kansas City

I guess it would help for the REFERENCE to have something that exists to point to. Once I put in the CREATE FIELD everything started working. Thanks.

-- Final Code
Code:
--message headers
DECLARE I INTEGER 1;
DECLARE J INTEGER CARDINALITY(InputRoot.*[]);
WHILE I < J DO
SET OutputRoot.*[I] = InputRoot.*[I];
SET I = I + 1;
END WHILE;
--
CREATE FIELD OutputRoot.XML.XMLMessage;
DECLARE OutputMsg REFERENCE TO OutputRoot.XML.XMLMessage;
SET OutputMsg = InputRoot.XML.XMLMessage;
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 » New to References
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.