Reason codes

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

Table 1. Reason codes and what they mean
Reason code Explanation
MQRC_LIBRARY_LOAD_ERROR (6000) One or more of the IBM MQ libraries could not be loaded. Check that all IBM MQ libraries are in the correct search path on the system you are using. For example, make sure that the directories containing the IBM MQ libraries are in PATH.
MQRC_CLASS_LIBRARY_ERROR (6001) One of the IBM MQ classlibrary calls returned an unexpected ReasonCode or CompletionCode value. 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 settings and requires one or more additional options. An implicit reopen is required but 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. Set the OpenOptions values explicitly to cover all eventualities so that implicit reopening is not required.
MQRC_REOPEN_INQUIRE_ERROR (6101) An open object does not have the correct OpenOptions settings and requires one or more additional options. An implicit reopen is required but closure has been prevented because one or more characteristics of the object need to be checked dynamically prior to closure, and the OpenOptions values do not already include the MQOO_INQUIRE option. Set the OpenOptions values explicitly to include the MQOO_INQUIRE option.
MQRC_REOPEN_SAVED_CONTEXT_ERR (6102) An open object does not have the correct OpenOptions settings and requires one or more additional options. An implicit reopen is required but closure has been prevented because the queue is open with the MQOO_SAVE_ALL_CONTEXT option, and a destructive Get call 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. Set the OpenOptions values explicitly to cover all eventualities so that implicit reopening is not required.
MQRC_REOPEN_TEMPORARY_Q_ERROR (6103) An open object does not have the correct OpenOptions settings and requires one or more additional options. An implicit reopen is required, but closure has been prevented because the queue is a local queue of the definition type MQQDT_TEMPORARY_DYNAMIC, which would be destroyed by closure. Set the OpenOptions values explicitly to cover all eventualities so that implicit reopening is not required.
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 values 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 encoding 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 might be caused by using explicit declarations for IBM MQ objects that are used from Visual Basic or Excel as parameters to calls. For example:
  • From Visual Basic, dim msg as Object works correctly, whereas dim msg as MqMessage might not work correctly.
  • From Visual Basic, with a queue defined and set, dim msg as MqMessageq.put msg works correctly, whereas from Excel this command generates an MQRC_NULL_POINTER exception.
MQRC_NO_CONNECTION_REFERENCE (6109) The MQQueue object has lost its connection to the MQQueueManager object. This will occur if the queue manager is disconnected. Delete the MQQueue object.
MQRC_NO_BUFFER (6110) No buffer is available. For an MQMessage object, a buffer cannot be allocated because there is an internal inconsistency in the object state.
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 attribute and for a MessageId attribute. 32 is a correct length for an AccountingToken attribute.
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 previously destroyed.
MQRC_CONTEXT_OPEN_ERROR (6122) The MQPutMessageOptions context reference refers to an MQQueue object that could not be opened to establish a context. This might 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 header, 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 is not available, and a connection cannot be established implicitly.
MQRC_NOT_OPEN (6125) A method failed because an IBM MQ object is not open, and opening cannot be accomplished implicitly.
MQRC_DISTRIBUTION_LIST_EMPTY (6126) An MQDistributionList failed to open because there are no MQDistributionListItem 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 then retry.

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