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 » eSQL

Post new topic  Reply to topic
 eSQL « View previous topic :: View next topic » 
Author Message
madi
PostPosted: Wed Apr 26, 2006 12:45 pm    Post subject: eSQL Reply with quote

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
View user's profile Send private message
elvis_gn
PostPosted: Wed Apr 26, 2006 8:45 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
madi
PostPosted: Thu Apr 27, 2006 5:46 am    Post subject: Reply with quote

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
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 » eSQL
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.