Reason codes

The following reason codes can occur in addition to those documented for the WebSphere MQ MQI. For other codes, refer to your WebSphere MQ application event log.

Reason code Explanation
MQRC_LIBRARY_LOAD_ERROR (6000) One or more of the WebSphere MQ libraries could not be loaded. Check that all WebSphere MQ libraries are in the correct search path on the system you are using. For example, make sure that the directories containing the WebSphere MQ libraries are in PATH.
MQRC_CLASS_LIBRARY_ERROR (6001) One of the WebSphere MQ classlibrary calls returned an unexpected ReasonCode/CompletionCode. Check the First Failure Symptom Report for details. Take note of the last method/property and class being used and inform IBM Support of the problem.
MQRC_STRING_LENGTH_TOO_BIG (6002) An attempt has been made to write a UTF format string with a length greater than 65,535 bytes to the message buffer.
MQRC_WRITE_VALUE_ERROR (6003) A value is used that is out of range; for example msg.WriteByte (240).
MQRC_PACKED_DECIMAL_ERROR (6004) An attempt has been made to read a packed decimal number from the message buffer but the data at the data pointer is not in a valid packed data format.
MQRC_FLOAT_CONVERSION_ERROR (6005) An attempt has been made to read a single or double floating point number from the message buffer but the data at the data pointer is not in an appropriate floating point format.
MQRC_REOPEN_EXCL_INPUT_ERROR (6100) An open object does not have the correct OpenOptions and requires one or more additional options. An implicit reopen is required but closure has been prevented. Set the OpenOptionsexplicitly to cover all eventualities so that implicit reopening is not required. Closure has been prevented because the queue is open for exclusive input and closure would present a window of opportunity for others potentially to gain access to the queue.
MQRC_REOPEN_INQUIRE_ERROR (6101) An open object does not have the correct OpenOptions and requires one or more additional options. An implicit reopen is required but closure has been prevented. Set the OpenOptions explicitly to include MQOO_INQUIRE. Closure has been prevented because one or more characteristics of the object need to be checked dynamically prior to closure, and the OpenOptions do not already include MQOO_INQUIRE.
MQRC_REOPEN_SAVED_CONTEXT_ERR (6102) An open object does not have the correct OpenOptions and requires one or more additional options. An implicit reopen is required but closure has been prevented. Set the OpenOptions explicitly to cover all eventualities so that implicit reopening is not required. Closure has been prevented because the queue is open with MQOO_SAVE_ALL_CONTEXT, and a destructive Get has been performed previously. This has caused retained state information to be associated with the open queue and this information would be destroyed by closure.
MQRC_REOPEN_TEMPORARY_Q_ERROR (6103) An open object does not have the correct OpenOptions and requires one or more additional options. An implicit reopen is required, but closure has been prevented. Set the OpenOptionsexplicitly to cover all eventualities so that implicit reopening is not required. Closure has been prevented because the queue is a local queue of the definition type MQQDT_TEMPORARY_DYNAMIC, which would be destroyed by closure.
MQRC_ATTRIBUTE_LOCKED (6104) An attempt has been made to change the value or attribute of an object while that object is open. Certain attributes, such as AlternateUserId, cannot be changed while an object is open.
MQRC_CURSOR_NOT_VALID (6105) The browse cursor for an open queue has been invalidated since it was last used by an implicit reopen. Set the OpenOptions explicitly to cover all eventualities so that implicit reopening is not required.
MQRC_ENCODING_ERROR (6106) The encoding of the next message item needs to be MQENC_NATIVE for reading.
MQRC_STRUCID_ERROR (6107) The structure of the id for the next message item, which is derived from the 4 characters beginning at the data pointer, is either missing or is inconsistent with the type of variable into which the item is being read.
MQRC_NULL_POINTER (6108) A null pointer has been supplied where a non-null pointer is either required or implied. This may be caused by using explicit declarations for WebSphere MQ objects used from VBA as parameters to calls (for example dim msg as Object is ok, dim msg as MqMessage can cause problems). For example, in Excel, with q defined and set dim msg as MqMessageq.put msg gives reasonCode MQRC_NULL_POINTER. It operates correctly from VisualBasic.
MQRC_NO_CONNECTION_REFERENCE (6109) The MQQueue object has lost its connection to the MQQueueManager. This will occur if the MQQueueManageris disconnected. Delete the MQQueue object.
MQRC_NO_BUFFER (6110) No buffer is available. For an MQMessage object, one cannot be allocated, denoting an internal inconsistency in the object state that should not occur.
MQRC_BINARY_DATA_LENGTH_ERROR (6111) The length of the binary data is inconsistent with the length of the target attribute. Zero is a correct length for all attributes. 24 is a correct length for a CorrelationId and for a MessageId 32 is a correct length for an AccountingToken
MQRC_BUFFER_NOT_AUTOMATIC (6112) A user-defined and managed buffer cannot be resized. Because message buffers are system managed, this indicates an internal inconsistency.
MQRC_INSUFFICIENT_BUFFER (6113) There is insufficient buffer space available after the data pointer to accommodate the request. This could be because the buffer cannot be resized.
MQRC_INSUFFICIENT_DATA (6114) There is insufficient data after the data pointer to accommodate the read request. Reduce the buffer to the correct size and read the data again.
MQRC_DATA_TRUNCATED (6115) Data has been truncated when copying from one buffer to another. This could be because the target buffer cannot be resized, or because there is a problem addressing one or other buffer, or because a buffer is being downsized with a smaller replacement.
MQRC_ZERO_LENGTH (6116) A zero length has been supplied where a positive length is either required or implied.
MQRC_NEGATIVE_LENGTH (6117) A negative length has been supplied where a zero or positive length is required.
MQRC_NEGATIVE_OFFSET (6118) A negative offset has been supplied where a zero or positive offset is required.
MQRC_INCONSISTENT_FORMAT (6119) The format of the next message item is inconsistent with the type of variable into which the item is being read.
MQRC_INCONSISTENT_OBJECT_STATE (6120) There is an inconsistency between this object, which is open, and the referenced MQQueueManager object, which is not connected.
MQRC_CONTEXT_OBJECT_NOT_VALID (6121) The MQPutMessageOptions context reference does not reference a valid MQQueue object. The object has been previoulsy destroyed.
MQRC_CONTEXT_OPEN_ERROR (6122) The MQPutMessageOptions context reference references an MQQueue object that could not be opened to establish a context. This may be because the MQQueue object has inappropriate open options. Inspect the referenced object reason code to establish the cause.
MQRC_STRUC_LENGTH_ERROR (6123) The length of an internal data structure is inconsistent with its content. For an MQRMH, the length is insufficient to contain the fixed fields and all offset data.
MQRC_NOT_CONNECTED (6124) A method failed because a required connection to a queue manager was not available, and a connection cannot be established implicitly.
MQRC_NOT_OPEN (6125) A method failed because a WebSphere MQ object was not open, and opening cannot be accomplished implicitly.
MQRC_DISTRIBUTION_LIST_EMPTY (6126) An MQDistributionList failed to open because there are no MQDistributionList Item objects in the distribution list.

Corrective action: Add at least one MQDistributionListItem object to the distribution list.

MQRC_INCONSISTENT_OPEN_OPTIONS (6127) A method failed because the object is open, and the open options are inconsistent with the required operation.

Corrective action: Open the object with appropriate open options and retry.

MQRC_WRONG_VERSION (6128) A method failed because a version number specified or encountered is either incorrect or not supported.