IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

DB2 Stored Procedure with MQ Listener


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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

Global Moderator


Joined: 21 Sep 2010
Posts: 2591
Location: NYC,USA

PostPosted: Fri Oct 16, 2015 12:11 am
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts In JCL Procedure how we can execute R... CLIST & REXX 7
No new posts Execute DSNTEP2 in REXX which is call... CLIST & REXX 4
No new posts Usage of pre-processor statement in p... PL/I & Assembler 1
No new posts Procedure Division Section COBOL Programming 2
No new posts How to DEBUG DB2 Stored Procedures Us... DB2 0
Search our Forums:

Back to Top