Page 1 of 1

How to use option CORRELID

PostPosted: Fri Jul 22, 2011 3:56 pm
by Mann_B
Hi

We have an MQ application which uses the same Q of some other App.I read like when we use same Q ,
Correlation id will have the the message ID for the request message .When we get the reply message the this correlation id will be moved to the corr ID of reply message,So that we can get the reply specific to our request.

Can you pls let me know on how to work on this,am new to MQ.
We already have an app which uses a Q.
Now i need to have another app to use the same Q and have to change the initial one such that it also uses same Q.
Can u pls guide me on this change on how to use same Q for 2 app.and What would be the changes to the existing app.
How we can use this CORRID ?

Thank You

Re: How to use option CORRELID

PostPosted: Fri Jul 22, 2011 9:26 pm
by Ed Goodman
-program builds the message, including the proper headers
-program opens the queue
-program writes a message to the queue
-header field for the corrid gets updated to contain the corrid that MQ creates on the fly
-program can then specify that same corrid when reading a queue to get a specific message back

How that corrid gets saved and passed around by the programs is up to you.

If the existing app is not using corrid at all, then it will need to learn how to save them up when it writes them and pass them to the app that needs to read the specific records from the sending program.

Re: How to use option CORRELID

PostPosted: Mon Jul 25, 2011 11:11 am
by Mann_B
Hi Ed

Thank you for your reply
"header field for the corrid gets updated to contain the corrid that MQ creates on the fly"

I dnt get this ..

n is this id gets generated or do we need to create a uniq id every time?

Re: How to use option CORRELID

PostPosted: Mon Jul 25, 2011 11:28 pm
by dick scherrer
Hello,

n is this id gets generated or do we need to create a uniq id every time?
Please do not use Tweet (or kiddie room chat) formats when posting.

Please do use complete words and sentences. . .

Thank you,

d

Re: How to use option CORRELID

PostPosted: Thu Jul 28, 2011 11:13 pm
by Ed Goodman
In a COBOL program, when you make the "MQPUT" call, there are several areas you include in the call. One of those parm areas contains that corrid field. If the call is successful, that field get changed to a valid id.