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 SELECT statement to get information from Input Message

Post new topic  Reply to topic
 ESQL SELECT statement to get information from Input Message « View previous topic :: View next topic » 
Author Message
satya2481
PostPosted: Fri Mar 18, 2011 2:58 am    Post subject: ESQL SELECT statement to get information from Input Message Reply with quote

Disciple

Joined: 26 Apr 2007
Posts: 170
Location: Bengaluru

Hi All,
I am using WMB V6.1.0.7 toolkit and not understanding how to write SELECT query to get some information from the Input message. Below are the details...

Input Message
Code:
<Information>
   <Block>
      <TranType>Debit</TranType>
      <Amount>-110</Amount>
      <Indicator>P</Indicator>
   </Block>
   <Block>
      <TranType>Credit</TranType>
      <Amount>3000</Amount>
      <Indicator>P</Indicator>
   </Block>
   <Block>
      <TranType>Credit</TranType>
      <Amount>10</Amount>
      <Indicator>1</Indicator>
   </Block>
   <Block>
      <TranType>Debit</TranType>
      <Amount>-3000</Amount>
      <Indicator>2</Indicator>
   </Block>
   <Block>
      <TranType>Credit</TranType>
      <Amount>10</Amount>
      <Indicator>2</Indicator>
   </Block>
</Information>


Requirement

Need to perform below operations
- Group the <Block> groups based on the <Indicator> tag value
- Check TranType of each group of same Indicator type. If there are pairs (TranType = Credit and Debit) then set a flag
- Select distinct Indicator values from all the <Block> groups

Can some one tell is it possible to use SELECT statement for this or not. If possible how to do ?

Thank You
satya
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Fri Mar 18, 2011 3:07 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It is possible to run ESQL Select against InputRoot, because it is not a plain SQL Select statement and thus understands the message tree as well as database tables.

ESQL Select does not support Group By or Order By clauses, because it is not a plain SQL Select statement.

So is it possible to do what you want with ESQL Select?
Back to top
View user's profile Send private message
satya2481
PostPosted: Fri Mar 18, 2011 3:31 am    Post subject: Reply with quote

Disciple

Joined: 26 Apr 2007
Posts: 170
Location: Bengaluru

Yes, even I have read that Group By, Order By, Distinct is not supported in ESQL SELECT...
So I was wondering if we can fulfil the requirement by any other means... not using any loopings....

Regards
Satya
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Fri Mar 18, 2011 4:57 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

What is the requirement to avoid loopings?

What is the advantage gained by using multiple deeply nested SELECT statements over a more clearly written loop?
Back to top
View user's profile Send private message
satya2481
PostPosted: Sun Mar 20, 2011 10:34 pm    Post subject: Reply with quote

Disciple

Joined: 26 Apr 2007
Posts: 170
Location: Bengaluru

Quote:
What is the requirement to avoid loopings?

I feel SELECT is faster than looping or consumes less memory... Since we are running in a mainframe Broker environment the MIPS needs to be less...

Quote:
What is the advantage gained by using multiple deeply nested SELECT statements over a more clearly written loop?

I think above answer is also holds good here...
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » ESQL SELECT statement to get information from Input Message
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.