Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DB2 Stored Procedure with MQ Listener

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Mariraj

New User


Joined: 09 Jul 2007
Posts: 59
Location: Chennai

PostPosted: Thu Oct 15, 2015 8:59 pm    Post subject: DB2 Stored Procedure with MQ Listener
Reply with quote

We have a need to log all the messages written to different queues to the same table. We are planning to use DB2 stored procedures with MQ Listeners. One of the columns in the log table is used to indicate the source of the message (say Source1, Source2, etc).

know that the DB2 MQ Listener will deliver the message to the Stored Proc as input. I am trying to find out if there is any way to identify the source queue name in the stored procedure.

Appreciate your inputs on this.

Thanks.
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2038
Location: NY,USA

PostPosted: Fri Oct 16, 2015 12:11 am    Post subject:
Reply with quote

You can check SYSMQL.LISTENERS but why dont you design multiple SP's for different queue's and each SP does its own task as it should and make a MQ set up that way?
e.g.
Quote:
If you want several different message types to be processed by different DB2 stored procedures (i.e., message type A drives an insert to DB2 table X, message type B is input to an update of table Y, etc.), set up several input queues, and associate with each the stored procedure that is to operate on a given message type. Then, have the input-providing application programs direct each message type to its designated queue.
Source1--->Queue name( say 'source1.queue')---> SP name( say source1) and so on...
Back to top
View user's profile Send private message
Mariraj

New User


Joined: 09 Jul 2007
Posts: 59
Location: Chennai

PostPosted: Fri Oct 16, 2015 1:35 am    Post subject:
Reply with quote

Hi Rohit,

Yes we can have individual SPs for each MQ. Since the table in which the MQ messages will be stored is the same, I am trying to find out if there is a way to use a common SP for all the MQs.

If I remember correctly, I have seen CICS modules using MQTM structure to identify the trigger information.

I am trying to find out if DB2 MQ Listener can provide any such info to the Stored Procedure or if there are any DB2 MQ functions to retrieve the info needed.

Thanks for your inputs.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SQL Code 302 while executing stored ... Ashishpanpaliya DB2 8 Wed Aug 01, 2018 7:54 pm
No new posts sql code 331 while calling Stored Pro... Ashishpanpaliya DB2 5 Wed Aug 01, 2018 7:06 pm
No new posts Add delay in External stored procedure smenjoge DB2 1 Thu Jul 19, 2018 1:21 am
No new posts Handling result sets in the calling N... Rusikesh DB2 7 Fri Apr 13, 2018 12:25 am
No new posts CICS web service from DB2 Triggers or... kiranprasad DB2 2 Wed Dec 20, 2017 11:10 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us