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 » Getting to a Tag using ESQL

Post new topic  Reply to topic
 Getting to a Tag using ESQL « View previous topic :: View next topic » 
Author Message
MQUser123
PostPosted: Fri Jun 18, 2004 11:22 am    Post subject: Getting to a Tag using ESQL Reply with quote

Novice

Joined: 28 Aug 2003
Posts: 18

Can someone please tell me how to get to the Quantity tag with qualifier of "OPEN" using ESQL.


<Add_PO>
- <QUANTITY qualifier="OPEN">
<VALUE>1</VALUE>
<NUMOFDEC>0</NUMOFDEC>
<SIGN>+</SIGN>
<UOM>PCS</UOM>
</QUANTITY>

- <QUANTITY qualifier="ORDERED">
<VALUE>1</VALUE>
<NUMOFDEC>0</NUMOFDEC>
<SIGN>+</SIGN>
<UOM>PCS</UOM>
</QUANTITY>

- <QUANTITY qualifier="RECEIVED">
<VALUE>0</VALUE>
<NUMOFDEC>0</NUMOFDEC>
<SIGN>+</SIGN>
<UOM>PCS</UOM>
</QUANTITY>
</Add_PO>
Back to top
View user's profile Send private message
JT
PostPosted: Fri Jun 18, 2004 11:39 am    Post subject: Reply with quote

Padawan

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

Try this:
Code:
SET extractedValue = THE (SELECT ITEM T.VALUE from InputRoot.XML.Add_PO.QUANTITY[] AS T WHERE T.(XML.Attribute)qualifier = 'OPEN');
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Jun 18, 2004 11:42 am    Post subject: Reply with quote

Jedi Knight

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

You will need code similar to this,
Code:

select A.* where
InputRoot.XML.Add_PO.QUANTITY[] as A
where A.(XML.Attribute)qualifier='OPEN'


For more info please refer to ESQL reference manual.
_________________
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
MQUser123
PostPosted: Fri Jun 18, 2004 1:17 pm    Post subject: Reply with quote

Novice

Joined: 28 Aug 2003
Posts: 18

Thanks for the response. I am still getting some error though.
What I am trying to do is this:
Set the VALUE for QUANTITY with "Qualifier =OPEN" to 0
Back to top
View user's profile Send private message
kirani
PostPosted: Fri Jun 18, 2004 1:50 pm    Post subject: Reply with quote

Jedi Knight

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

In that case navigate the tree and search for the matching QUANTITY tag. When found, set the value for <VALUE> tag to 0.
_________________
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
MQUser123
PostPosted: Mon Jun 21, 2004 6:33 am    Post subject: Reply with quote

Novice

Joined: 28 Aug 2003
Posts: 18

Thanks again for your response. But thats exactly what my question is:
How do I navigate to that particular QUANTITY tag and set the value of the VALUE of tag to 0. All the QUANTITY tags are exactly identical execpt the qualifiers which differentiates them.
Back to top
View user's profile Send private message
martinrydman
PostPosted: Tue Jun 22, 2004 3:35 am    Post subject: Reply with quote

Centurion

Joined: 30 Jan 2004
Posts: 139
Location: Gothenburg, Sweden

Something like this:

WBIMB 5.0 Code:

Code:

FOR Q AS OutputRoot.XML.Add_PO.QUANTITY[] DO
   IF Q(XML.Attr)qualifier = 'OPEN' THEN
      SET Q.VALUE = ...
   END IF;
END FOR;


HTH

/Martin
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 » Getting to a Tag using 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.