IBM MQ reason code

MQRC 2110: Message format error

MQRC 2110 (MQRC_FORMAT_ERROR, hex 083E) is a warning from MQGET with MQGMO_CONVERT. The queue manager couldn't convert the message because of its format name, so it returned the data unconverted.

Other names for this code

Also written as RC2110, reason code 2110, MQ 2110, MQ error 2110, MQRC_FORMAT_ERROR, 083E, 0x083E, format error, MQGMO_CONVERT 2110, MQFMT_NONE conversion.

What it means

When an application gets a message with MQGMO_CONVERT, the queue manager tries to turn the data into the character set (CodedCharSetId) and number encoding the application asked for. It decides how to do that from the Format field in the message descriptor. MQ converts its built-in formats, such as MQFMT_STRING, itself. Other formats need a data conversion exit with the same name as the format.

2110 means the format stopped conversion. The format may be MQFMT_NONE (blanks), which tells MQ the data has no known layout. It may name a user exit that the queue manager can't find. Or the data may not match what the format says it is. The call ends with MQCC_WARNING. The message is removed from the queue as normal (unless browsing) and returned without conversion. CodedCharSetId and Encoding in the MQMD are set to describe the data as returned, so the program can tell it wasn't converted.

This matters most between z/OS and distributed systems. A z/OS program expects EBCDIC, while a Linux or Windows sender usually writes ASCII or UTF-8. If the sender leaves Format blank, conversion never happens, and the z/OS program gets ASCII bytes with a 2110 warning.

Common causes

  • The sending program left Format as MQFMT_NONE (blanks) for text data that the receiver wants converted. It should have used MQFMT_STRING.
  • The message uses a user-defined format name, and no data conversion exit of that name is installed where the queue manager can load it.
  • The data doesn't match its format, for example a message marked as a known header format whose bytes are something else.
  • A message with several parts, such as one with a dead-letter header, where some parts convert and others don't.

How to find the problem

  1. Browse the message with amqsbcg or dmpmqmsg on distributed MQ, or a browse tool on z/OS, and look at Format, CodedCharSetId and Encoding in the MQMD.
  2. Check the sending program to see what Format it sets. In JMS, a TextMessage gets MQSTR, but a BytesMessage doesn't.
  3. For a user format, check that the conversion exit is installed in the queue manager's exits directory and named exactly after the format.
  4. Log the MQMD after the get. If CodedCharSetId still shows the sender's code page, the data is unconverted.

How to fix it

  • Have the sender set Format to MQFMT_STRING when the whole message is character data.
  • For structured messages with binary fields, write a data conversion exit (on distributed MQ, crtmqcvx generates code from a C structure) or convert in the application.
  • Handle 2110 in the receiver. Check CodedCharSetId and convert the data yourself if needed, rather than assuming it is in the local code page.
  • Don't mark binary data, such as packed decimal fields, as MQFMT_STRING. Character conversion would damage it.

IBM documentation

IBM documentation: MQRC 2110. Use the documentation for your installed release.

Report a correction to WND Software.

Questions

Is the message lost after 2110?

No. The get still completes with a warning and the application receives the message, just not converted. It is up to the program to handle the data in its original form.

What is the difference between 2110 and 2119?

2110 means the format stopped conversion before it started, for example a blank or unknown format. 2119 means conversion was attempted and failed, for example because of an unsupported CCSID.

Why does a message from Linux look garbled on z/OS?

The bytes are ASCII or UTF-8 and the z/OS program reads them as EBCDIC. Set Format to MQFMT_STRING on the sender and use MQGMO_CONVERT on the receiver.