Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

correlationid 1

Status
Not open for further replies.

AZSEEK

Programmer
Feb 13, 2003
84
US
can anyone please post a sample of what a correlationid should look like... i believe that I am getting line feeds or illegal characters...
 
The correlation ID is 24 bytes of binary data. It is NOT a character string. The CorrelID is NOT terminated by a null character. Each byte can contain any hexadecimal value from x00 to xFF.

When you create a message, you can store any data you want into the Correlation ID. If the Queue Manager creates the CorrelID for you, it uses a formula based on Qmgr name and the time of day. (See the MQ API Reference for details. It varies by platform.)

In any event, when you specify a CorrelID on the MQGET call (in the MQMD), the Qmgr will only get the message if ALL 24 bytes match exactly.

John
 
the queue seems to be returning a correlation id; however, it seems to contain tab or carriage returns -- little square boxes within the information... so I wasn't sure if there was a reply out there but it is getting trashed so how....

here is what I am returning
AMQ QM_MQ_PROD_CyS]>bpb (but the 'b' are actually little squares for the most part)...

should the correlation id being longer....
 
That looks like a "reasonable" correl ID generated by a Queue Manager. I counted 23 bytes, but there might be something after the final b.
Parts of it will look funny, but it's not intended to ba a displayable field.

To summarize from the manual, there are three sections to the correlID:
- 'AMQ ' - identifies it as MQSeries; on z/OS (MVS) it would be 'CSQ '
- the first 12 characters of the Queue Manager name
- "A value derived from the system clock"

The "system clock" part will be hexadecimal values, that may or may not be printable. If you try to print them, they may be little squares, or arrows, or circles, or whatever.

I don't know what language your code is in, but you have to make sure you move or compare exactly 24 bytes when you deal with the correlID. In C, you should use "memcpy" instead of "strcpy", for instance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top