Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 1609
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 Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am
No new posts Is possible to call subprogram from c... cmsmoon COBOL Programming 3 Fri Aug 05, 2016 6:46 pm
This topic is locked: you cannot edit posts or make replies. Stored procedure on Federated thru DB2 arif677 DB2 6 Tue May 31, 2016 11:48 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us