MDOLN (10-digit signed integer)

Length of original message.

This field is of relevance only for report messages that are segments. It specifies the length of the message segment to which the report message relates; it does not specify the length of the logical message of which the segment forms part, nor the length of the data in the report message.

Note:
When generating a report message for a message that is a segment, the queue manager and message channel agent copy into the MQMD for the report message the MDGID, MDSEQ, MDOFF, and MDMFL, fields from the original message. As a result, the report message is also a segment. Applications that generate report messages are recommended to do the same, and to ensure that the MDOLN field is set correctly.

The following special value is defined:

OLUNDF

Original length of message not defined.

MDOLN is an input field on the MQPUT and MQPUT1 calls, but the value provided by the application is accepted only in particular circumstances:

  • If the message being put is a segment and is also a report message, the queue manager accepts the value specified. The value must be:

    • Greater than zero if the segment is not the last segment

    • Not less than zero if the segment is the last segment

    • Not less than the length of data present in the message

    If these conditions are not satisfied, the call fails with reason code RC2252.

  • If the message being put is a segment but not a report message, the queue manager ignores the field and uses the length of the application message data instead.

  • In all other cases, the queue manager ignores the field and uses the value OLUNDF instead.

This is an output field on the MQGET call.

The initial value of this field is OLUNDF. This field is ignored if MDVER is less than MDVER2.