DATLEN (10-digit signed integer) - output

Length of the message.

This is the length in bytes of the application data in the message. If this is greater than BUFLEN, only BUFLEN bytes are returned in the BUFFER parameter (that is, the message is truncated). If the value is zero, it means that the message contains no application data.

If BUFLEN is less than the message length, DATLEN is still filled in by the queue manager, whether or not GMATM is specified on the GMO parameter (see the GMOPT field described in MQGMO - Get-message options for more information). This allows the application to determine the size of the buffer required to accommodate the message data, and then reissue the call with a buffer of the appropriate size.

However, if the GMCONV option is specified, and the converted message data is too long to fit in BUFFER, the value returned for DATLEN is: