MQSeries: Message and Correlation ID does not contain valid EBCDIC characters
|Date:||06 October 2006|
|Abstract:||Can we send the Message ID and Correlation ID across JSM|
|Submitted By:||LANSA Technical Support|
When using MQSeries programs, the Message and Correlation ID's are not displayed in the correct format. Passing the Message ID and Correlation ID's as XML as a <tag> produces an error similar to:
"XMLHelper: parser fatal error : An invalid XML character (Unicode: 0x16) was found in the value of attribute "value" and element is "rdml:field"."
When you use the MQSeries BIF's or programs the message id and correlation id returned from the API call are 24 bytes.
JSMMID Message Id - CHAR 24
JSMCID Correlation Id - CHAR 24
These id's are just a sequence of bits and are not valid characters.
The documentation states that:
"When the LANSA function or RPG program receives the Message Id and Correlation Id, do not send these values across to the loaded JSM service, because they do not contain valid EBCDIC characters."
If you need to store these message id's or send them in an XML message, then you should convert them to a string representation.
For example, use the BINTOHEX BIF to convert the binary data into hex characters.