Data conversion

Convert data that your message flows are transferring between different environments by using WebSphere® MQ or IBM® Integration Bus facilities.

Data conversion is the process by which data is transformed from the format that is recognized by one operating system into the format that is recognized by a second operating system with different characteristics such as numeric order.

If you are using a network of systems that use different methods for storing numeric values, or you need to communicate between users who view data in different code pages, you must consider how to implement data conversion.

Code page conversions
Code page conversion might be required for one or more of the following reasons:
  • ASCII versus EBCDIC
  • Code pages that are specific to national language
  • Code pages that are specific to operating systems

In WebSphere MQ, these factors are handled by the CCSID field in the MQMD header. For more information about the MQMD header, see "MQMD - Message descriptor" in the Application Programming Reference section of the WebSphere MQ Version 7.5 product documentation online. For more information about code page support, see "Code page conversion", also in the Application Programming Reference section.

Encoding
Encoding (byte order) conversion might be required for one or both of the following reasons:
  • Big endian versus little endian

    Endian is an attribute of data that describes whether it is stored in computer memory or transmitted with the most significant byte first (big endian) or last (little endian).

  • Floating point number representations

In WebSphere MQ, these factors are handled by the Encoding field in the MQMD header. For more information about the MQMD header, see "MQMD - Message descriptor" in the Application Programming Reference section of the WebSphere MQ Version 7.5 product documentation online. For more information about encoding, see "Machine encoding", also in the Application Programming Reference section.

If you are configuring a message flow to receive messages:
  • Messages received across a WebSphere MQ protocol that uses WebSphere MQ headers, contain code page encoding characteristics in the MQMD header, and optionally in other WebSphere MQ headers.
  • Messages received across protocols that do not use WebSphere MQ headers do not include these characteristics. Configure these characteristics by using properties on the nodes in your message flows. For example, set the Message coded character set ID and Message encoding properties on the FileInput node.
If you are configuring a message flow to send messages to other applications or systems:
  • Messages sent across a WebSphere MQ protocol contain code page encoding characteristics in the MQMD header, and optionally in other WebSphere MQ headers.
  • Messages sent across protocols that do not use WebSphere MQ headers must be modified to include these characteristics in the Properties folder in the logical message tree structure. The parser called by the output node uses these values to generate the correct bit stream.

When you use IBM Integration Bus, you can use the data conversion facilities of IBM Integration Bus, WebSphere MQ, or both.

IBM Integration Bus facilities
You can model your messages in the MRM domain through the IBM Integration Toolkit. Predefined elements of the messages are converted according to their type and physical layer characteristics. For more information, see Message Sets: Configuring physical properties. You can also use self-defining messages. You can then use the Compute, or JavaCompute node to configure encoding and CCSIDs. You do not need WebSphere MQ data conversion exits.
  • String data is converted according to the CCSID setting.
  • Decimal integer and float extended decimal types are converted according to the CCSID setting.
  • Decimal integer and float (other physical data types) are converted according to the Encoding setting.
  • Binary and Boolean data is not converted.

IBM Integration Bus can also convert the WebSphere MQ headers for which parsers are provided.

When you use IBM Integration Bus facilities, the whole message is not converted to the specified encoding and CCSID: you can specify a different encoding, or CCSID, or both, in each header to perform a different conversion for the following part of the message. The encoding and CCSID in the last header defines the values for the message body.

WebSphere MQ facilities

Headers and message body are converted according to the values set in the appropriate MQMD fields, and other header format names. You might need to set up data conversion exits to convert the body of your messages.

When you use WebSphere MQ facilities, the whole message is converted to the specified encoding and CCSID, according to the setting of the format in the WebSphere MQ header.

For more detail about data conversion using WebSphere MQ facilities, see "Data conversion" in the Application Programming Reference section of the WebSphere MQ Version 7.5 product documentation online.