|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Move a reference to a variable |
« View previous topic :: View next topic » |
Author |
Message
|
lillo |
Posted: Thu Jun 13, 2002 11:53 pm Post subject: Move a reference to a variable |
|
|
Master
Joined: 11 Sep 2001 Posts: 224
|
Hi,
I would like to move a reference variable to the content of another variable. Is this possible?
Let see an example:
DECLARE ref REFERENCE TO OutputRoot.XML
SET OutputRoot = InputRoot;
SET Environment.Field = 'FieldA';
I need the referencie to point to OutputRoot.XML.FieldA, So I tried
EVAL ('MOVE ref TO ref' || Environment.Field)
but it doesn´t work, any idea?
thanks
Lillo |
|
Back to top |
|
 |
kirani |
Posted: Fri Jun 14, 2002 7:46 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Lillo,
You cannot reference to something which doesn't exist! In your code you are trying to create a reference to some field in Output tree but your output tree is created below it.
You should rearrange your statements as follows,
Code: |
SET OutputRoot = InputRoot;
DECLARE ref REFERENCE TO OutputRoot.XML
SET Environment.Field = 'FieldA';
EVAL ('MOVE ref TO ref.' || Environment.Field)
|
Remember, EVAL is an expensive operation. You can implement the same using Reference Variable and MOVE, LASTMOVE, FIELDNAME, ..
Regards, _________________ 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 |
|
 |
lillo |
Posted: Sun Jun 16, 2002 12:51 am Post subject: |
|
|
Master
Joined: 11 Sep 2001 Posts: 224
|
Thanks for your reply, but what is more expensive use the eval function or search for different tags in the xml tree using the reference?
Thanks in advance
Lillo _________________ Lillo
IBM Certified Specialist - WebSphere MQ |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|