2010 (07DA) (RC2010): MQRC_DATA_LENGTH_ERROR

Explanation

The DataLength parameter is not valid. Either the parameter pointer is not valid, or it points to read-only storage. (It is not always possible to detect parameter pointers that are not valid; if not detected, unpredictable results occur.)

This reason can also be returned to an MQ MQI client program on the MQGET, MQPUT, or MQPUT1 call, if the BufferLength parameter exceeds the maximum message size that was negotiated for the client channel. This might be because MAXMSGL is not set correctly for the channel definition (see Maximum message length (MAXMSGL)), or, if you are using MQCONNX, and supplying an MQCD, then the MaxMsgLength of that data structure needs to be set with a higher value (see Using MQCONNX).

Completion code

MQCC_FAILED

Programmer response

Correct the parameter.

If the error occurs for an MQ MQI client program, also check that the maximum message size for the channel is big enough to accommodate the message being sent; if it is not big enough, increase the maximum message size for the channel.