MQRC 2119: Message not converted
MQRC 2119 (MQRC_
Other names for this code
Also written as RC2119, reason code 2119, MQ 2119, MQ error 2119, MQRC_NOT_CONVERTED, 0847, 0x0847, not converted, MQ CCSID conversion error, MQGMO_CONVERT 2119.
What it means
MQGMO_
The usual reasons are a CCSID the queue manager can't convert between, wrong values in the MQMD when the message was put, or data that isn't valid in the character set it claims to use. For a message made of several parts, such as one with a dead-letter header, some parts may be converted while others aren't. The CCSID and encoding fields in each part still describe that part correctly.
Some more specific codes exist for parts of the same problem. 2111 and 2115 report a bad source or target CCSID, and 2120 says the converted message is too big for the buffer. 2119 is the general case when conversion didn't happen.
Common causes
- The sender put the message with the wrong CodedCharSetId, so the data doesn't match the character set the queue manager thinks it is in.
- The requested conversion isn't supported on this platform, for example an unusual EBCDIC or double-byte CCSID with no conversion table installed.
- The receiving program sets an invalid or unintended CodedCharSetId or Encoding in the MQMD before the get.
- Binary data is marked as MQFMT_
STRING, so it holds byte sequences that can't be converted. - Only part of a multi-part message could be converted.
How to find the problem
- Browse the message and note its Format, CodedCharSetId and Encoding. On distributed MQ use
amqsbcgordmpmqmsg. - Log the CodedCharSetId and Encoding the receiving program sets before MQGET. A common bug is reusing an MQMD from an earlier get, so the values are whatever the last message had.
- Check the error log of the queue manager, or of the client if the client did the conversion, for messages about conversion around the time of the get.
- Look at a hex dump of the data to see whether it really matches the CCSID it claims. UTF-8 text marked as an EBCDIC code page is a typical example.
How to fix it
- Fix the sender so the MQMD describes the data correctly. Set CodedCharSetId to the real code page and Format to MQFMT_
STRING only for text. - Reset CodedCharSetId and Encoding in the receiver's MQMD before every get, to the values the program wants.
- If the platform can't convert between the two CCSIDs, convert in the application, or have the sender use a common CCSID such as UTF-8 (1208).
- Handle 2119 in the receiver by checking the returned CCSID and processing or rejecting the message, instead of treating the bytes as local text.
IBM documentation
IBM documentation: MQRC 2119. Use the documentation for your installed release.
Related codes
Questions
Does 2119 mean the get failed?
No. It is a warning. The message was retrieved, but its data is in the original character set and encoding rather than the ones requested.
Why did conversion fail on only some messages?
Conversion depends on each message's own MQMD. A few messages put by a different program, or with an unusual CCSID, can fail while the rest convert normally.
Should the sender or the receiver convert?
MQ's usual approach is that the sender describes the data accurately and the receiver asks for conversion with MQGMO_CONVERT. Channels can also convert with CONVERT(YES), but receiver-side conversion is generally preferred.