Configuring message flows for data conversion

If you exchange messages between applications that run on systems that are incompatible in some way, you can configure your system to provide data conversion as the message passes through the integration node.

About this task

Data conversion might be necessary if either of the following two values are different on the sending and receiving systems:

  1. CCSID. The Coded Character Set Identifier refers to a set of coded characters and their code point assignments. IBM® Integration Bus can process and construct application messages in any code page for which WebSphere® MQ provides conversion to and from Unicode, on all operating systems. For more information about code page support, see the Application Programming Reference section of the WebSphere MQ Version 7.5 product documentation online.

    This behavior might be affected by the use of other products in conjunction with IBM Integration Bus. Check the documentation for other products, including any databases that you use, for further code page support information.

  2. Encoding. This setting defines the way in which a machine encodes numbers; that is, binary integers, packed-decimal integers, and floating point numbers. Numbers that are represented as characters are handled in the same way as all other string data.

If the native CCSID and encoding on the sending and receiving systems are the same, you do not need to call data conversion processes.

IBM Integration Bus and WebSphere MQ provide data conversion facilities to support message exchange between unlike systems. Your choice of which facilities to use depends on the characteristics of the messages that are processed by your message flows:

Messages that contain text only

Read this section if your messages are WebSphere MQ messages that contain all text (character data or string).

If WebSphere MQ supports the systems on which both sending and receiving applications are running for data conversion, use WebSphere MQ facilities which provide the most efficient data conversion option.

The default behavior of WebSphere MQ is to put messages to queues specifying the local system CCSID and encoding. Applications issuing MQGET can request that the queue manager provides conversion to their local CCSID and encoding as part of get processing.

To use this option:

  1. Design messages to be text-only. If you are using COBOL, move numeric fields to USAGE DISPLAY to put them into string form.
  2. Set the Format field in the MQMD to MQFMT_STRING (value MQSTR).
  3. Call MQGET with MQGMO_CONVERT in the receiving application. If you prefer, you can convert when the message is received by the integration node, by setting the Convert property of the MQInput node to yes (by selecting the check box).

If you require more sophisticated data conversion than WebSphere MQ provides in this way (for example, to an unsupported code page), use WebSphere MQ data conversion exits. For more information about these, see the Application Programming Reference section of the WebSphere MQ Version 7.5 product documentation online.

Messages that include numerics

Read this section if your messages include numeric data, or are text only but are not WebSphere MQ messages.

If these messages can be predefined (that is, their content and structure is known and predictable), use the facilities provided by IBM Integration Bus and the MRM.

All application messages are handled by the integration node in Unicode, to which they are converted on input, and from which they are converted on output. You can configure message flows to influence the way in which output messages are constructed.

To use this option:

  1. Define the output message in the MRM domain. You can create this definition in one of the following ways:
    • Import an external message definition (for example a C header or COBOL copybook).
    • Create the message model in the message definition editor.
  2. Configure a message flow to receive and process this message:
    1. If you include an MQInput node, do not request conversion by this node.
    2. Include a Compute node in the message flow to create the output message with the required content:
      • If the output message is a WebSphere MQ message, code ESQL in the Compute node to set the CCSID and encoding for the target system in the MQMD.

        For example, to set values for a target z/OS® system running with CCSID of 37 and encoding of 785:

        SET OutputRoot.MQMD.CodedCharSetId = 37;
        SET OutputRoot.MQMD.Encoding = 785;
      • If the output message is not a WebSphere MQ message, code ESQL in the Compute node to set the CCSID and encoding for the target system in the Properties folder.
Messages that are self-defining

Read this section if your messages are self-defining.

Self-defining messages are supported in the XML and JMS domains. These messages are all text and can be handled by WebSphere MQ, if they originate from, or are destined for, WebSphere MQ applications. If not, use IBM Integration Bus facilities by setting the CCSID and Encoding fields in the Properties folder in the message when it passes through a Compute node.