IBM Support

Messages with MQFMT_IMS_VAR_STRING are converted to the correct length by MQ although the LL field was coded incorrectly

Question & Answer


Question

We created IMS messages with LLZZ+tranid+data on an ASCII platform using format 'MQIMSVS '. We add one to the actual message length and then manually byte-swapped the LL (length) value, because the message is from a Windows Intel platform that uses Little-Endian format.

For example, 01390000 was byte-swapped to 39010000. The byte-swap by the processor then changed it back to 01390000. The first two messages were passed to IMS by way of OTMA successfully, but the last message was rejected by IMS with sense code 001A001D (SMB header is not found). MQRC 2110 ('83E') MQRC_FORMAT_ERROR .

Message #1 LL field = x'0139'; was byte-swapped by the application to 3901; actual message length is x'0138' Message #2 LL field = x'0123'; was byte-swapped by the application to 2301; actual message length is x'0122' Message #3 LL field = x'00FC'; was byte-swapped by the application to FC00; actual message length is x'00FC'

NOTE: This question originated from a technote.

Answer

The reason the LL of 00FC is not corrected is that the code will first byte-swap the LL, giving x'FC00'. This is to ensure that the resulting value does not exceed the maximum message length, 32764, that can be sent to IMS OTMA. Because x'FC00' converts to decimal 64512, it exceeds 32764, so the MQGET fails with MQRC 2110.

Ensure that the IMS LL value does not exceed the maximum message length of 32764 that can be sent to IMS OTMA.

Specify the actual length in the LL field without manually byte-swapping it, because the channel initiator will attempt to convert the message data.

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPH2","label":"IBM Information Management System (IMS)"},"Platform":[{"code":"PF035","label":"z\/OS"}],"Component":"","Version":"","Line of Business":{"code":"LOB35","label":"Mainframe SW"}}]

Document Information

Modified date:
26 April 2017

UID

dwa1371312