How to use option CORRELID



Support for MQSeries and Websphere Message Oriented Middleware communication systems for z/OS

How to use option CORRELID

Postby Mann_B » Fri Jul 22, 2011 3:56 pm

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
Mann_B
 
Posts: 79
Joined: Wed Mar 31, 2010 11:48 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to use option CORRELID

Postby Ed Goodman » Fri Jul 22, 2011 9:26 pm

-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.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: How to use option CORRELID

Postby Mann_B » Mon Jul 25, 2011 11:11 am

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?
Mann_B
 
Posts: 79
Joined: Wed Mar 31, 2010 11:48 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to use option CORRELID

Postby dick scherrer » Mon Jul 25, 2011 11:28 pm

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
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: How to use option CORRELID

Postby Ed Goodman » Thu Jul 28, 2011 11:13 pm

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.
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times


Return to WebSphere MQ