Application data conversion

Application data might need to be converted to the character set and the encoding required by another application where different platforms are concerned.

It can be converted at the sending queue manager, or at the receiving queue manager. If the library of built-in formats does not meet your needs, we can define your own. The type of conversion depends on the message format that is specified in the format field of the message descriptor, MQMD.

Note: Messages with MQFMT_NONE specified are not converted.


Conversion at the sending queue manager

Set the CONVERT channel attribute to YES if we need the sending message channel agent (MCA) to convert the application data.

The conversion is performed at the sending queue manager for certain built-in formats and for user-defined formats if a suitable user exit is supplied.

    Built-in formats
    These include:

    • Messages that are all characters (using the format name MQFMT_STRING)
    • IBM MQ defined messages, for example Programmable Command Formats

      IBM MQ uses Programmable Command Format messages for administration messages and events (the format name used is MQFMT_ADMIN in this case). We can use the same format (using the format name MQFMT_PCF) for the own messages, and take advantage of the built-in data conversion.

    The queue manager built-in formats all have names beginning with MQFMT. They are listed and described in Format.

    Application-defined formats

    For user-defined formats, application data conversion must be performed by a data-conversion exit program (for more information, see Writing data-conversion exits ). In a client-server environment, the exit is loaded at the server and conversion takes place there.


Conversion at the receiving queue manager

Application message data can be converted by the receiving queue manager for both built-in and user-defined formats.

The conversion is performed during the processing of an MQGET call if we specify the MQGMO_CONVERT option. For details, see the Options


Coded character sets

IBM MQ products support the coded character sets that are provided by the underlying operating system.

When creating a queue manager, the queue manager coded character set ID (CCSID) used is based on that of the underlying environment. If this is a mixed code page, IBM MQ uses the SBCS part of the mixed code page as the queue manager CCSID.

For general data conversion, if the underlying operating system supports DBCS code pages, IBM MQ can use it.

See the documentation for the operating system for details of the coded character sets that it supports.

We need to consider application data conversion, format names, and user exits when writing applications that span multiple platforms. See Writing data-conversion exits for information about invoking and writing data-conversion exits.

Parent topic: Format of message control information and message data