2144 (0860) (RC2144): MQRC_TARGET_LENGTH_ERROR

Explanation

On the MQXCNVC call, the TargetLength parameter is not valid for one of the following reasons:
  • TargetLength is less than zero.
  • The TargetLength parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not valid; if not detected, unpredictable results occur.)
  • The MQDCC_FILL_TARGET_BUFFER option is specified, but the value of TargetLength is such that the target buffer cannot be filled completely with valid characters. This can occur when TargetCCSID is a pure DBCS character set (such as UTF-16), but TargetLength specifies a length that is an odd number of bytes.

This reason code can also occur on the MQGET call when the MQGMO_CONVERT option is specified. In this case it indicates that the MQRC_TARGET_LENGTH_ERROR reason was returned by an MQXCNVC call issued by the data conversion exit.

Completion code

MQCC_WARNING or MQCC_FAILED

Programmer response

Specify a length that is zero or greater. If the MQDCC_FILL_TARGET_BUFFER option is specified, and TargetCCSID is a pure DBCS character set, ensure that TargetLength specifies a length that is a multiple of two.

If the reason code occurs on the MQGET call, check that the logic in the data-conversion exit is correct.