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.
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)...
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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.