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 » Problem with MessageBroker6.0/MQSI2.1 in using CARDINALITY.

Post new topic  Reply to topic
 Problem with MessageBroker6.0/MQSI2.1 in using CARDINALITY. « View previous topic :: View next topic » 
Author Message
kevin_22
PostPosted: Tue Dec 26, 2006 4:20 am    Post subject: Problem with MessageBroker6.0/MQSI2.1 in using CARDINALITY. Reply with quote

Centurion

Joined: 08 Mar 2005
Posts: 100

Hi,

I am facing a problem in using 'CARDINALITY' function. Please find the details below,

Input Message:
<Test>
<d1>1</d1>
<d2>1</d2>
</Test>

MessageFlow: MQInput Node-->Compute Node-->MQOutput Node

ESQL in compute node:
SET OutputRoot.XML.Data.CardVal = CARDINALITY(InputBody.Test.*[])

The expected output is 2 but i am getting 5 !!!

CARDINALITY function is working fine (Showing 2) with input message without an enter at ends of tag as: <Test><d1>1</d1><d2>1</d2></Test>

Note: I am using 'rfhutil' tool to put the message in the input Queue.

I dont understand the difference between the two message format mentioned above apart from the <CR><LF>

Please share your ideas.

Operating system: Windows Server 2003

Thanks,
Kevin

Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Dec 26, 2006 4:34 am    Post subject: Reply with quote

Grand High Poobah

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

Well cursor line feed will create additional elements containing just cusor and line feed. You might try the XMLNSC domain and suppress the white spaces and such... Wait you haven't upgraded to V6 yet and mqsi 2.x is out of support....
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
kevin_22
PostPosted: Tue Dec 26, 2006 5:19 am    Post subject: Reply with quote

Centurion

Joined: 08 Mar 2005
Posts: 100

Hello fjb_saper:

Yes, broker is treating 'enter' after each tag as a child. The problem is there in MQSI 2.1 as well as MB6.0 also.

Thanks,
Kevin
Back to top
View user's profile Send private message
JosephGramig
PostPosted: Tue Dec 26, 2006 7:00 am    Post subject: Reply with quote

Grand Master

Joined: 09 Feb 2006
Posts: 1244
Location: Gold Coast of Florida, USA

And then you can see a difference with these statements:

Code:

DECLARE iCard INTEGER;
SET iCard = CARDINALITY(InputRoot.XML.Test.*[]);
SET iCard = CARDINALITY(InputRoot.XML.Test.(XML.Element)*[]);


The first one returns 5 and the second returns 2. Of course, I'm looking at this with the visual debugger in V6. This should work for 2.1, but wait! It is out of support.
_________________
Joseph
Administrator - IBM WebSphere MQ (WMQ) V6.0, IBM WebSphere Message Broker (WMB) V6.1 & V6.0
Solution Designer - WMQ V6.0
Solution Developer - WMB V6.1 & V6.0, WMQ V5.3
Back to top
View user's profile Send private message AIM Address
jefflowrey
PostPosted: Tue Dec 26, 2006 7:29 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Gosh, I wonder if the COMPACT XML Namespace parser would handle this differently?

Please don't use the XML domain. It's at least as deprecated as 2.1 is.

Use XMLNS on v5 and use XMLNSC on v6.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
shalabh1976
PostPosted: Tue Dec 26, 2006 8:48 pm    Post subject: Reply with quote

Partisan

Joined: 18 Jul 2002
Posts: 381
Location: Gurgaon, India

I dunno if this might help:
The XML and XMLNS domains create name-value elements for the white space formatting characters between
the close and open of each folder or field. These white space elements have an empty name and a value for the
space, tab, line feed, or other characters, that are used in the formatting of the XML document.
These elements have no useful value and can therefore be discarded to improve the compaction.
For the same reason, the default behavior is to discard any XML processing instructions and comments in the input stream,
and to create no elements in the compact domain tree.
_________________
Shalabh
IBM Cert. WMB V6.0
IBM Cert. MQ V5.3 App. Prog.
IBM Cert. DB2 9 DB Associate
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
kevin_22
PostPosted: Tue Dec 26, 2006 9:27 pm    Post subject: Reply with quote

Centurion

Joined: 08 Mar 2005
Posts: 100

Hello All,

I appreciate you all in exploring this.
I am considering to use '(XML.Element)*[]' for finding CARDINALITY as a best practice. MQInput Node with 'XMLNSC' domain is also working fine.

Thanks,
Kevin
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 » Problem with MessageBroker6.0/MQSI2.1 in using CARDINALITY.
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.