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
 

 

Need help in retrieving correlid of a message

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Java & MQSeries
View previous topic :: :: View next topic  
Author Message
veeruspi

New User


Joined: 29 Dec 2005
Posts: 16
Location: mysore

PostPosted: Mon Mar 14, 2011 3:41 pm    Post subject: Need help in retrieving correlid of a message
Reply with quote

Hi All,
I have a requirement where in I have 2 transactions, namely TRN1 and TRN2. TRN1 will put a message onto Queue1. When a message in put onto Queue1, TRN2 is triggered in the background. It does a get from Queue1 and processes the message and put the response onto Queue2. In my first program, after putting a message onto queue1, I am trying to get the response message from queue2 after 20 seconds delay. Here inorder to identify the message I have used MQPMO-NEW-CORREL-ID in MQPMO options in first program and I have saved MQPMO-NEW-CORREL-ID in working storage variable to use it while getting the message. Here my question is how can we get the correlid of a message in queue1 in second program so that same can be used while putting a message onto queue2?

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

Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 995
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Tue Mar 15, 2011 8:49 pm    Post subject:
Reply with quote

The way you describe is not the standard way to achieve what you want.

Standard practice is for TRN1 to issue MQPUT(1) to put a message on Queue1. This returns a MsgId in the Message Descriptor (MQMD) to TRN1 application. This is then put into the MQMD.CorrelId for the MQGET of the reply message which TRN1 issues.

The message that was MQPUT(1) carries the MsgId in its Message Descriptor and this is presented to TRN2 along with the name of the ReplytoQ. TRN2 then moves this MsgId to the CorrelId field of the reply which it will MQPUT(1) to Queue2 (the ReplytoQ) and a new MsgId is generated for the reply.

In this way, TRN1 always issues an MQGET for the message with a CorrelId that matches the MsgId from the MQPUT(1).

Hope this helps,
Garry.
Back to top
View user's profile Send private message
veeruspi

New User


Joined: 29 Dec 2005
Posts: 16
Location: mysore

PostPosted: Fri Mar 18, 2011 10:57 am    Post subject:
Reply with quote

Thanks Garry. It was very informative and helped me alot.
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 -> Java & MQSeries All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts REXX WTO for console message bipinpeter CLIST & REXX 6 Tue Jun 27, 2017 3:56 pm
No new posts How to show message using batch jobs madprasy TSO/ISPF 7 Fri Sep 09, 2016 6:55 pm
No new posts Truncated error message after VERIFY ... David Sde TSO/ISPF 4 Mon Sep 05, 2016 11:26 pm
No new posts IEC999I MESSAGE ERROR Manshadi ABENDS & Debugging 3 Sun Apr 17, 2016 3:43 pm
No new posts Error message from the J2ee converter sivasaras IMS DB/DC 5 Thu Nov 26, 2015 3:20 pm


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