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 IndexWebSphere Message Broker SupportCardinality fun and games

Post new topicReply to topic
Cardinality fun and games View previous topic :: View next topic
Author Message
Segs
PostPosted: Tue Nov 13, 2001 3:28 am Post subject: Reply with quote

Voyager

Joined: 04 Oct 2001
Posts: 78
Location: Zurich Financial Services

Hi

I've got some XML

<CONTAINER><data><p1><a>Fred</a><b>Fred</b><c>Fred</c><d>Fred</d></p1><p2><a>Fred</a><b>Fred</b><c>Fred</c><d>Fred</d></p2></data></CONTAINER>

When you execute the Esql statements

SET I = CARDINALITY InputRoot.XML.CONTAINER.data.*[]);
SET X = CARDINALITY(InputRoot.XML.CONTAINER.data.P3.*[]);

I and X equate to 2, even though you can't navigate to InputRoot.XML.CONTAINER.data.P3

I would have expected the result of the 2nd statement to be 0.

Am I missing something?

Please have a look at the trace below.

Thanks

Segs...

BIP2537I: Node 'Cardinality_Test.Compute1': Executing statement 'SET X = CARDINALITY(InputRoot.XML.CONTAINER.data.P3.*[]);' at (11, 1).
The statement being executed was 'SET X = CARDINALITY(InputRoot.XML.CONTAINER.data.P3.*[]);'.
No user action required.
BIP2538I: Node 'Cardinality_Test.Compute1': Evaluating expression 'CARDINALITY(InputRoot.XML.CONTAINER.data.P3.*[])' at (11, 9).
The expression being evaluated was 'CARDINALITY(InputRoot.XML.CONTAINER.data.P3.*[])'.
No user action required.
BIP2543E: Node 'Cardinality_Test.Compute1': (11, 50) : Failed to navigate to path element.
The specified path element did not exist.
No user action required.
UserTrace BIP2540I: Node 'Cardinality_Test.Compute1': Finished evaluating 'CARDINALITY(InputRoot.XML.CONTAINER.data.P3.*[])' at (11, 9); result was '2'.
The result of evaluating the expression 'CARDINALITY(InputRoot.XML.CONTAINER.data.P3.*[])' was '2'.
No user action required.

Back to top
View user's profile Send private message Send e-mail
Tibor
PostPosted: Tue Nov 13, 2001 3:43 am Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

Segs,

There is no InputBody....P3 element in your XML tree, therefore CARDINALITY() results its parent property, IMO.



Back to top
View user's profile Send private message
Segs
PostPosted: Tue Nov 13, 2001 4:33 am Post subject: Reply with quote

Voyager

Joined: 04 Oct 2001
Posts: 78
Location: Zurich Financial Services

Thanks for this but I've just tested this on 2.0.1 broker and this set X to 0. This must be introduced in 2.0.2. I'll read the 2.0.2 readme's.

Segs
Back to top
View user's profile Send private message Send e-mail
Segs
PostPosted: Tue Nov 13, 2001 10:15 am Post subject: Reply with quote

Voyager

Joined: 04 Oct 2001
Posts: 78
Location: Zurich Financial Services

Apparently this is a known problem as is corrected in CSD 2 for MQSI v2.0.2
Back to top
View user's profile Send private message Send e-mail
DaveyD
PostPosted: Wed Dec 12, 2001 9:41 am Post subject: Reply with quote

Novice

Joined: 11 Dec 2001
Posts: 12

Try this instead :

SET I = CARDINALITY (InputRoot.XML.CONTAINER.data[]);
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportCardinality fun and games
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.