|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
eSQL |
« View previous topic :: View next topic » |
Author |
Message
|
madi |
Posted: Wed Apr 26, 2006 12:45 pm Post subject: eSQL |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
Hi All
Take a look at this code
Code: |
CREATE LASTCHILD OF OutputRoot.XML.Transaction PARSE(msg,InputRoot.MQMD.Encoding,InputRoot.MQMD.CodedCharSetId,'','','XML');
DECLARE ptr REFERENCE TO OutputRoot.XML.Transaction.XML;
MOVE ptr LASTCHILD;
IF LASTMOVE(ptr) THEN
SET OutputRoot.XML.Transaction.Products.Product[I] = ptr.Products.Product;
END IF;
|
after MOVE ptr LASTCHILD; I cannot see the ptr in the debug perspective
it works if just say
Code: |
CREATE LASTCHILD OF OutputRoot.XML.Transaction PARSE(msg,InputRoot.MQMD.Encoding,InputRoot.MQMD.CodedCharSetId,'','','XML');
DECLARE ptr REFERENCE TO OutputRoot.XML.Transaction.XML.Products.Product;
-- MOVE ptr LASTCHILD;
-- IF LASTMOVE(ptr) THEN
SET OutputRoot.XML.Transaction.Products.Product[I] = ptr;
-- END IF;
|
the previous code is working till now but suddenly giving errors (array subscript)
--madi |
|
Back to top |
|
 |
elvis_gn |
Posted: Wed Apr 26, 2006 8:45 pm Post subject: |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi madi,
Do you have multiple Transaction.XML....You are creating the ptr reference to the Transaction.XML....if there are no multiples of XML then the MOVE will fail and the LASTMOVE will be a false and hence the SET will not work....So if the code did not work, its understandable....but u said
Quote: |
I cannot see the ptr in the debug perspective |
...that should mean that Transaction.XML itself is not created...check the structure.
Also you just created the Transaction.XML
Code: |
CREATE LASTCHILD OF OutputRoot.XML.Transaction PARSE... |
and did not SET anything to it yet....
How do u expect the reference
Code: |
SET OutputRoot.XML.Transaction.Products.Product[I] = ptr.Products.Product; |
ptr to have .Products.Product ? Or maybe i missed something....
Code: |
SET OutputRoot.XML.Transaction.Products.Product[I] = ptr; |
I is not defined
Regards.[/b][/quote] |
|
Back to top |
|
 |
madi |
Posted: Thu Apr 27, 2006 5:46 am Post subject: |
|
|
 Chevalier
Joined: 17 Jan 2006 Posts: 475
|
that was only a part of code so I is defined.
I am getting these fles as blob from a java get node (custom node, we are in v5) and then parsing it into XML and creating a temp tag at the end of the OutputRoot.XML.Transaction.
then i say LASTCHILD which should take me to the newly parsed XML tag at the bottom
i can see all these tags created fine in the debug message tree but the ptr is just not moving to it unless i set it explicily to the last child
--madi |
|
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
|
|
|
|