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 » Parsing question

Post new topic  Reply to topic
 Parsing question « View previous topic :: View next topic » 
Author Message
schroederms
PostPosted: Fri Nov 18, 2011 1:25 pm    Post subject: Parsing question Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

Looking thru the example on version 7 of the toolkit I came across a sample for large messages (currently we have one message taking 6 hours to gnerate 380,000 + messages)

I see in the sample code they have this:
DECLARE ROOT_LEVEL CONSTANT CHARACTER 'SaleEnvelope';
DECLARE HEADER CONSTANT CHARACTER 'Header';
DECLARE REPEATING_ELEMENT_COUNT CONSTANT CHARACTER 'SaleListCount';
DECLARE REPEATING_ELEMENT CONSTANT CHARACTER 'SaleList';

IF FIELDNAME( InputBody.{ROOT_LEVEL}.{HEADER}.*[>]) = REPEATING_ELEMENT_COUNT THEN

Is this type of coding not using the parser since CONSTANTS are being used, or what is the advantage?

Thanks.
Back to top
View user's profile Send private message
kimbert
PostPosted: Fri Nov 18, 2011 2:48 pm    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Let's get a couple of things straight:
- ESQL changes message trees.
- A parser creates message trees from messages, or creates messages from message trees.

Maybe you are getting confused about on-demand parsing. ESQL can sometimes cause the parser to do some parsing. This happens when Parse Timing is set to 'On Demand' AND the message flow ( ESQL in this case ) tries to access a field that has not yet been parsed.

Now to answer your question. This line:
Code:
DECLARE ROOT_LEVEL CONSTANT CHARACTER 'SaleEnvelope';
...is just declaring a constant string value for ESQL to use. This line:
Code:
IF FIELDNAME( InputBody.{ROOT_LEVEL}.{HEADER}.*[>]) = REPEATING_ELEMENT_COUNT THEN
...is getting the name of a field in the message tree, and comparing that name to a constant string value. The field in question is the last child of InputBody.SaleEnvelope.Header.

I'm not sure why the author decided to declare/use those string constants, rather than writing the path references in the standard way. Maybe the other ESQL needs them. Whatever the reason, I can assure you that the parser still needs to create the message tree so that the ESQL can operate on it.
Back to top
View user's profile Send private message
schroederms
PostPosted: Fri Nov 18, 2011 2:55 pm    Post subject: Reply with quote

Disciple

Joined: 21 Jul 2003
Posts: 169
Location: IA

Thanks for clearing that up.
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 » Parsing question
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.