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 doesn't work

Post new topic  Reply to topic
 ESQL doesn't work « View previous topic :: View next topic » 
Author Message
sleon807
PostPosted: Wed Apr 05, 2006 2:23 pm    Post subject: ESQL doesn't work Reply with quote

Novice

Joined: 17 Mar 2006
Posts: 11

Somebody can help me?

<?xml version="1.0" encoding="UTF-8"?>
<MSG>
<A>
<A1></A1>
.
<AN></AN>
</A>
<B>
<B1>
<B11>A</B11>
<B12>B</B12>
<B13>C</B13>
.
<B1N>X</B1N>
</B1>
<B2>
<B21>D</B21>
<B22>E</B22>
<B23>F</B23>
.
<B2N>X</B2N>
</B2>
.
.
<BN>...</BN>
</B>
</MSG>

Hi I hope that somebody can help me with this problem, I've been trying to get the number of structures below of <B> Tag e.g. <B1><B2>..<BN> but without sub-structures of these e.g. <B11><B12> .. <B21><B22>, etc. For doing this I'm using the function shown below but without success

DECLARE J INTEGER CARDINALITY(InputRoot.XML.MSG.B.*[]);

Once gotten this I'd like to get the name of structures that I got in the last step and assign them to a variable for compare them e.g. B1,B2...BN for this I've been using this functions but doesn't work.

SET NAME = FIELDNAME(InputRoot.XML.MSG.B.*[J]);
SET NAME = FIELDNAME(InputBody.XML.MSG.B.(XML.Element)[J]);
Back to top
View user's profile Send private message
madi
PostPosted: Wed Apr 05, 2006 3:41 pm    Post subject: Reply with quote

Chevalier

Joined: 17 Jan 2006
Posts: 475

Quote:
SET NAME = FIELDNAME(InputBody.XML.MSG.B.(XML.Element)[J]);

try SET NAME = FIELDNAME(InputBody.XML.MSG.B.(XML.tag)[J]);

Isnt NAME a reserved word, how are u using this?

I cannot think of a way to do your main part though, lets wait for some grand masters to respond.

--madi
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed Apr 05, 2006 6:06 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Read up on ESQL manual.

As an alternative and as I did not find it myself: have you tried passing the array and the locator/index in the array to java and having java return you the name ?

Enjoy
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
elvis_gn
PostPosted: Wed Apr 05, 2006 7:25 pm    Post subject: Reply with quote

Padawan

Joined: 08 Oct 2004
Posts: 1905
Location: Dubai

Hi sleon807,

Declare a list e.g LocalEnvironment.Variables.BsList[]

Use the LIKE keyword e.g InputRoot.XML.MSG.B.*[] LIKE 'B%';

Store the list returned into the list that u created and use it.

I did not understand what u want to compare ? Please tell us what ur looking to do once you get this list.

Regards.
Back to top
View user's profile Send private message Send e-mail
fschofer
PostPosted: Thu Apr 06, 2006 12:23 am    Post subject: Reply with quote

Knight

Joined: 02 Jul 2001
Posts: 524
Location: Mainz, Germany

Hi,

put a trace node with ${Root} before your compute node and show us the output.

Also perform a trace with debug level of the compute node execution.

Greetings
Frank
Back to top
View user's profile Send private message Send e-mail
dipankar
PostPosted: Thu Apr 06, 2006 3:30 am    Post subject: Reply with quote

Disciple

Joined: 03 Feb 2005
Posts: 171

Hi Sleon807,
Try to use this

Code:
FIELDNAME(InputBody.XML.MSG.B.(XML.Element)*[J])


I hope it works.
_________________
Regards
Back to top
View user's profile Send private message
sleon807
PostPosted: Mon Apr 10, 2006 9:18 am    Post subject: Reply with quote

Novice

Joined: 17 Mar 2006
Posts: 11

Ok, I tried to use what you told me but without success.

FIELDNAME(InputBody.XML.MSG.B.(XML.tag)[J]);
FIELDNAME(InputBody.XML.MSG.B.(XML.Element)*[J])

I realized that "InputBody" doesn't work and I changed it for "InputRoot", and all began to work perfectly

FIELDNAME(InputRoot.XML.MSG.B.(XML.tag)[J]);
FIELDNAME(InputRoot.XML.MSG.B.(XML.Element)*[J])


I used this code for the other topic and was useful.

Declare a list e.g LocalEnvironment.Variables.BsList[]
Use the LIKE keyword e.g InputRoot.XML.MSG.B.*[] LIKE 'B%';


THANKS FOR EVERYTHING
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Apr 10, 2006 9:34 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Quote:
If you are referring to the input message tree to interrogate its content in a Compute node, use correlation name InputBody followed by the path to the element to which you are referring. InputBody is equivalent to InputRoot followed by the parser name (for example, InputRoot.MRM), which you can use if you prefer.
just FYI
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL doesn't work
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.