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 » Stored procedure result set merging in ESQL

Post new topic  Reply to topic
 Stored procedure result set merging in ESQL « View previous topic :: View next topic » 
Author Message
samchenchu
PostPosted: Tue Aug 20, 2013 4:57 am    Post subject: Stored procedure result set merging in ESQL Reply with quote

Novice

Joined: 13 Aug 2013
Posts: 22

hi friends,

My stored procedure is retrieving the multiple resultsets and I want to merge the those into single xml. Can anyone please suggest me how to implement this scenario.javascript:emoticon('')
Back to top
View user's profile Send private message
Vitor
PostPosted: Tue Aug 20, 2013 5:01 am    Post subject: Re: Stored procedure result set merging in ESQL Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

samchenchu wrote:
Can anyone please suggest me how to implement this scenario.


By writing ESQL?

Seriously, what are you asking? What's the problem? What you've described is mapping the contents of a result set onto a message tree. There have to be a dozen ways to do that, and the "best" one varies.

What have you tried? Why didn't you think that was successful? Why are you posting here?

Better information, better advice.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
samchenchu
PostPosted: Tue Aug 20, 2013 8:23 am    Post subject: Reply with quote

Novice

Joined: 13 Aug 2013
Posts: 22

I have taken the stored procedure output into environment and below is the result in debug mode.now can you tell me how to take concatinate this 2 resultsets message into one xml.


WMQI_Environment
XMLNSC
ResultSet
XML_F52E2B61-18A1-11d1-B105-00805F49916B:CHARACTER:<ItemDepotRequest ItemNumber="124103" DepotNo="0" Itemtype="33" RequestedCases="11" XPercentageAvailableBOH="0.00" IsGPF="0" ValidationStatus=""/><ItemDepotRequest ItemNumber="135100" DepotNo="0" Itemtype="33" RequestedCases="7" XPercentageAvailableBOH="0.00" IsGPF="0" ValidationStatus=""/><ItemDepotRequest ItemNumber="148057" DepotNo="7491" Itemtype="20" RequestedCases="2055" XPercentageAvailableBOH="205.36" IsGPF="0"
ResultSet
XML_F52E2B61-18A1-11d1-B105-00805F49916B:CHARACTER:ValidationStatus=""/>
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Aug 20, 2013 8:43 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Use [c o d e ] tags when posting code in this forum.

You are asking how to write ESQL ? This is taught in the class. Have you been to the required training class ?

http://www-304.ibm.com/jct03001c/services/learning/ites.wss/us/en?pageType=course_description&courseCode=WM664

http://www-304.ibm.com/jct03001c/services/learning/ites.wss/us/en?pageType=course_description&courseCode=WM674


If you have not been to the required training class, what is your plan to acquire the needed knowledge?
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Vitor
PostPosted: Tue Aug 20, 2013 9:55 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

samchenchu wrote:
I have taken the stored procedure output into environment and below is the result in debug mode.


You're much better using Trace nodes for this.

samchenchu wrote:
now can you tell me how to take concatinate this 2 resultsets message into one xml.


One at a time. Seriously. It's that simple. I don't understand what you're asking. You've got 2 tags called ResultSet and you want the contents in 1 outbound XML. Welcome to WMB; we have this thing called ESQL which you've clearly discovered and used to load the Environment. What goes wrong after that?

See my comments above, especially how better information leads to better advice & mentioing at some point in your post what you've tried
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
samchenchu
PostPosted: Tue Aug 20, 2013 9:16 pm    Post subject: Reply with quote

Novice

Joined: 13 Aug 2013
Posts: 22

Hi,

How to concatinate two references?I am doing SET ConcatRef = TotEnvRef || ConcatRef; which is not working.Can anyone help me?
Back to top
View user's profile Send private message
samchenchu
PostPosted: Tue Aug 20, 2013 9:28 pm    Post subject: Reply with quote

Novice

Joined: 13 Aug 2013
Posts: 22

i am using below code to check the null value.
SET ConcatRef = COALESCE(TotEnvRef,'') || COALESCE(ConcatRef,'');

this statement is present in while loop and for the 2nd iteration the concatination is not happening,instead It is overwriting the value of 'ConcatRef'. javascript:emoticon('')
Back to top
View user's profile Send private message
samchenchu
PostPosted: Tue Aug 20, 2013 9:38 pm    Post subject: Reply with quote

Novice

Joined: 13 Aug 2013
Posts: 22

It is working..thank you...
Back to top
View user's profile Send private message
Vitor
PostPosted: Wed Aug 21, 2013 5:04 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

samchenchu wrote:
It is working..thank you...


Well done.

Care to post your solution for the benefit of future readers?
_________________
Honesty is the best policy.
Insanity is the best defence.
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 » Stored procedure result set merging in ESQL
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.