Data conversion

The data conversion is performed by either the distributed queuing facility (which may call any necessary exits) or by the intra group queuing agent (which does not support the use of exits) when it puts a message to a destination queue that has XCF information defined for its storage class. The data conversion does not occur when a message is delivered to a queue by publish/subscribe.

Any exits needed must be available to the distributed queuing facility in the data set referenced by the CSQXLIB DD statement. This means that we can send messages to an IMS application using the IBM MQ - IMS bridge from any IBM MQ platform.

If there are conversion errors, the message is put to the queue unconverted; this results eventually in it being treated as an error by the IBM MQ - IMS bridge, because the bridge cannot recognize the header format. If a conversion error occurs, an error message is sent to the z/OS console.

See Writing data-conversion exits for detailed information about data conversion in general.


Send messages to the IBM MQ - IMS bridge

To ensure that conversion is performed correctly, we must tell the queue manager what the format of the message is.

If the message has an MQIIH structure, the Format in the MQMD must be set to the built-in format MQFMT_IMS, and the Format in the MQIIH must be set to the name of the format that describes your message data. If there is no MQIIH, set the Format in the MQMD to your format name.

If your data (other than the LLZZs) is all character data (MQCHAR), use as your format name (in the MQIIH or MQMD, as appropriate) the built-in format MQFMT_IMS_VAR_STRING. Otherwise, use your own format name, in which case we must also provide a data-conversion exit for the format. The exit must handle the conversion of the LLZZs in your message, in addition to the data itself (but it does not have to handle any MQIIH at the start of the message).

If the application uses MFSMapName, we can use messages with the MQFMT_IMS instead, and define the map name passed to the IMS transaction in the MFSMapName field of the MQIIH.


Receive messages from the IBM MQ - IMS bridge

If an MQIIH structure is present on the original message that we are sending to IMS, one is also present on the reply message.

To ensure that your reply is converted correctly:

  • If we have an MQIIH structure on your original message, specify the format that we want for the reply message in the MQIIH ReplytoFormat field of the original message. This value is placed in the MQIIH Format field of the reply message. This is particularly useful if all your output data is of the form LLZZ<character data>.
  • If we do not have an MQIIH structure on your original message, specify the format that we want for the reply message as the MFS MOD name in the IMS application's ISRT to the IOPCB.

Parent topic: How the IMS bridge deals with messages