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 » using declare reference to

Post new topic  Reply to topic Goto page Previous  1, 2
 using declare reference to « View previous topic :: View next topic » 
Author Message
kirani
PostPosted: Thu Jul 18, 2002 8:18 pm    Post subject: Reply with quote

Jedi Knight

Joined: 05 Sep 2001
Posts: 3779
Location: Torrance, CA, USA

kwelch wrote:

I was under the impression, from a prior thread, on the same subject, that if you declared something within an IF or a WHILE that you could only use it within those confines?


Well ... that's true, but in above code we are declaring REFERENCE variable outside the loop, so it can be referred anywhere within the compute node.

Let me know how it goes on Monday. Have a great weekend!
_________________
Kiran


IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries

Back to top
View user's profile Send private message Visit poster's website
kwelch
PostPosted: Tue Jul 23, 2002 7:50 am    Post subject: Reply with quote

Master

Joined: 16 May 2001
Posts: 255

Hi Kiran,

I wasn't sure if the same applied to CREATE FIELD. I tried your solution and got it to work on a small example. I will have to try and incorporate it into our much larger project where there are numerous tags and levels. I don't see why it should not work though! Thanks again for all your help.

Karen
Back to top
View user's profile Send private message Send e-mail
Miriam Kaestner
PostPosted: Thu Jul 25, 2002 1:25 am    Post subject: Reply with quote

Centurion

Joined: 26 Jun 2001
Posts: 103
Location: IBM IT Education Services, Germany

There is another way to change the field names (XML tags), which may be also helpful in this case (many subfields):
-- at the end of your code
IF (InputRoot.XML.Customer.Code <> 'S') THEN
SET OutputRoot.XML.Customer.Address NAME = 'SWAddress';
END IF;
Back to top
View user's profile Send private message Send e-mail
kwelch
PostPosted: Thu Jul 25, 2002 10:01 am    Post subject: Reply with quote

Master

Joined: 16 May 2001
Posts: 255

thanks Miriam!
Back to top
View user's profile Send private message Send e-mail
CHERIANV
PostPosted: Mon Aug 05, 2002 4:47 pm    Post subject: Reply with quote

Apprentice

Joined: 15 Feb 2002
Posts: 43
Location: New York

Hi,
I am facing a somewhat similar problem when using CREATE FIELD along with PROPAGATE.

Suppose I use it like the following for an XML to MRM transformation for assigning my OutputRoot.MRM fields,it ofcourse doesnt work as it expects the CREATE FIELD and outref declaration to be within WHILE loop. I just want to figure out the most efficient way to do this as I have several lines of similiar field assignments and several messages and different scenarios to PROPAGATE within the WHILE loop.

DECLARE inref REFERENCE to InputRoot.XML.PARENT.CHILD[1];
CREATE FIELD OutputRoot.MRM.LEVEL1.LEVEL2;
DECLARE outref REFERENCE to OutputRoot.MRM.LEVEL1.LEVEL2;

WHILE LASTMOVE(inref) THEN
Assign Properties;
Assign MQMD;
Set outref.field1 = 'a';
Set outref.field2 = 'b';
Set outref.field3 = 'c';
PROPAGATE;

MOVE inref TO NEXTSIBLING REPEAT NAME;

END DO;

RETURN FALSE;
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » using declare reference to
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.