Appendix A. API completion and reason codes
For each call, a completion code and a reason code are returned by the queue manager or by an exit routine, to indicate the success or failure of the call.
Similarly, for each PCF command, a completion code and a reason code are returned by the queue manager to indicate the success or failure of the command. These codes include codes specific to PCF (described in Appendix B. PCF reason codes), and some of the API codes described here.
For more information about the WebSphere MQ API, see these manuals:
- WebSphere MQ Application Programming Guide
- WebSphere MQ Application Programming Reference
- WebSphere MQ Programmable Command Formats and Administration Interface
Completion codes
The following is a list of the completion codes (MQCC) returned by WebSphere MQ
- 0: Successful completion (MQCC_OK)
The call completed fully; all output parameters have been set.
The Reason parameter always has the value MQRC_NONE in this case.
- 1: Warning (partial completion) (MQCC_WARNING)
The call completed partially. Some output parameters might have been set in addition to the CompCode and Reason output parameters.
The Reason parameter gives additional information.
- 2: Call failed (MQCC_FAILED)
The processing of the call did not complete, and the state of the queue manager is normally unchanged; exceptions are specifically noted. Only the CompCode and Reason output parameters have been set; all other parameters are unchanged.
The reason might be a fault in the application program, or it might be a result of some situation external to the program, for example the application's authority might have been revoked. The Reason parameter gives additional information.
Reason codes
The reason code parameter (Reason) is a qualification to the completion code parameter (CompCode).
If there is no special reason to report, MQRC_NONE is returned. A successful call returns MQCC_OK and MQRC_NONE.
If the completion code is either MQCC_WARNING or MQCC_FAILED, the queue manager always reports a qualifying reason; details are given under each call description.
Where user exit routines set completion codes and reasons, they should adhere to these rules. In addition, any special reason values defined by user exits should be less than zero, to ensure that they do not conflict with values defined by the queue manager. Exits can set reasons already defined by the queue manager, where these are appropriate.
Reason codes also occur in:
- The Reason field of the MQDLH structure
- The Feedback field of the MQMD structure
Reason code list
The following is a list of reason codes, in numeric order, providing detailed information to help you understand them, including:
- An explanation of the circumstances that have caused the code to be raised
- The associated completion code
- Suggested programmer actions in response to the code
See Reason code cross reference for a list of reason codes in alphabetic order.
Codes in the range 3000 - 4999 (X'0BB8' - X'1387') are specific to PCF and are described in Appendix B. PCF reason codes.
0 (X'0000')MQRC_NONEExplanation:The call completed normally. The completion code (CompCode) is MQCC_OK.
Completion Code:MQCC_OK
Programmer Response:None.
900 (X'0384')MQRC_APPL_FIRSTExplanation:This is the lowest value for an application-defined reason code returned by a data-conversion exit. Data-conversion exits can return reason codes in the range MQRC_APPL_FIRST through MQRC_APPL_LAST to indicate particular conditions that the exit has detected.
Completion Code:MQCC_WARNING or MQCC_FAILED
Programmer Response:As defined by the writer of the data-conversion exit.
999 (X'03E7')MQRC_APPL_LASTExplanation:This is the highest value for an application-defined reason code returned by a data-conversion exit. Data-conversion exits can return reason codes in the range MQRC_APPL_FIRST through MQRC_APPL_LAST to indicate particular conditions that the exit has detected.
Completion Code:MQCC_WARNING or MQCC_FAILED
Programmer Response:As defined by the writer of the data-conversion exit.
2001 (X'07D1')MQRC_ALIAS_BASE_Q_TYPE_ERRORExplanation:An MQOPEN or MQPUT1 call was issued specifying an alias queue as the destination, but the BaseQName in the alias queue definition resolves to a queue that is not a local queue, a local definition of a remote queue, or a cluster queue.
Completion Code:MQCC_FAILED
Programmer Response:Correct the queue definitions.
2002 (X'07D2')MQRC_ALREADY_CONNECTEDExplanation:An MQCONN or MQCONNX call was issued, but the application is already connected to the queue manager.
- On z/OS, this reason code occurs for batch and IMS applications only; it does not occur for CICS applications.
- On AIX, HP-UX, i5/OS, Solaris, Windows, this reason code occurs if the application attempts to create a nonshared handle when a nonshared handle already exists for the thread. A thread can have no more than one nonshared handle.
- On Windows, MTS objects do not receive this reason code, as additional connections to the queue manager are allowed.
Completion Code:MQCC_WARNING
Programmer Response:None. The Hconn parameter returned has the same value as was returned for the previous MQCONN or MQCONNX call.
An MQCONN or MQCONNX call that returns this reason code does not mean that an additional MQDISC call must be issued in order to disconnect from the queue manager. If this reason code is returned because the application has been called in a situation where the connect has already been done, a corresponding MQDISC should not be issued, because this will cause the application that issued the original MQCONN or MQCONNX call to be disconnected as well.
2003 (X'07D3')MQRC_BACKED_OUTExplanation:The current unit of work encountered a fatal error or was backed out. This occurs in the following cases:
- On an MQCMIT or MQDISC call, when the commit operation has failed and the unit of work has been backed out. All resources that participated in the unit of work have been returned to their state at the start of the unit of work. The MQCMIT or MQDISC call completes with MQCC_WARNING in this case.
- On z/OS, this reason code occurs only for batch applications.
- On an MQGET, MQPUT, or MQPUT1 call that is operating within a unit of work, when the unit of work has already encountered an error that prevents the unit of work being committed (for example, when the log space is exhausted). The application must issue the appropriate call to back out the unit of work. (For a unit of work coordinated by the queue manager, this call is the MQBACK call, although the MQCMIT call has the same effect in these circumstances.) The MQGET, MQPUT, or MQPUT1 call completes with MQCC_FAILED in this case.
- On z/OS, this case does not occur.
Completion Code:MQCC_WARNING or MQCC_FAILED
Programmer Response:Check the returns from previous calls to the queue manager. For example, a previous MQPUT call may have failed.
2004 (X'07D4')MQRC_BUFFER_ERRORExplanation:The Buffer parameter is not valid for one of the following reasons:
- The 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 parameter pointer points to storage that cannot be accessed for the entire length specified by BufferLength.
- For calls where Buffer is an output parameter: the parameter pointer points to read-only storage.
Completion Code:MQCC_FAILED
Programmer Response:Correct the parameter.
2005 (X'07D5')MQRC_BUFFER_LENGTH_ERRORExplanation:The BufferLength parameter is not valid, or the parameter pointer is not valid. (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 client program on the MQCONN or MQCONNX call if the negotiated maximum message size for the channel is smaller than the fixed part of any call structure.
This reason should also be returned by the MQZ_ENUMERATE_AUTHORITY_DATA installable service component when the AuthorityBuffer parameter is too small to accommodate the data to be returned to the invoker of the service component.
Completion Code:MQCC_FAILED
Programmer Response:Specify a value that is zero or greater. For the mqAddString and mqSetString calls, the special value MQBL_NULL_TERMINATED is also valid.
2006 (X'07D6')MQRC_CHAR_ATTR_LENGTH_ERRORExplanation:CharAttrLength is negative (for MQINQ or MQSET calls), or is not large enough to hold all selected attributes (MQSET calls only). This reason also occurs if the parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not valid; if not detected, unpredictable results occur.)
Completion Code:MQCC_FAILED
Programmer Response:Specify a value large enough to hold the concatenated strings for all selected attributes.
2007 (X'07D7')MQRC_CHAR_ATTRS_ERRORExplanation:CharAttrs is not valid. The parameter pointer is not valid, or points to read-only storage for MQINQ calls or to storage that is not as long as implied by CharAttrLength. (It is not always possible to detect parameter pointers that are not valid; if not detected, unpredictable results occur.)
Completion Code:MQCC_FAILED
Programmer Response:Correct the parameter.
2008 (X'07D8')MQRC_CHAR_ATTRS_TOO_SHORTExplanation:For MQINQ calls, CharAttrLength is not large enough to contain all of the character attributes for which MQCA_* selectors are specified in the Selectors parameter.
The call still completes, with the CharAttrs parameter string filled in with as many character attributes as there is room for. Only complete attribute strings are returned: if there is insufficient space remaining to accommodate an attribute in its entirety, that attribute and subsequent character attributes are omitted. Any space at the end of the string not used to hold an attribute is unchanged.
An attribute that represents a set of values (for example, the namelist Names attribute) is treated as a single entity--either all of its values are returned, or none.
Completion Code:MQCC_WARNING
Programmer Response:Specify a large enough value, unless only a subset of the values is needed.
2009 (X'07D9')MQRC_CONNECTION_BROKENExplanation:Connection to the queue manager has been lost. This can occur because the queue manager has ended. If the call is an MQGET call with the MQGMO_WAIT option, the wait has been canceled. All connection and object handles are now invalid.
For MQ client applications, it is possible that the call did complete successfully, even though this reason code is returned with a CompCode of MQCC_FAILED.
Completion Code:MQCC_FAILED
Programmer Response:Applications can attempt to reconnect to the queue manager by issuing the MQCONN or MQCONNX call. It may be necessary to poll until a successful response is received.
- On z/OS for CICS applications, it is not necessary to issue the MQCONN or MQCONNX call, because CICS applications are connected automatically.
Any uncommitted changes in a unit of work should be backed out. A unit of work that is coordinated by the queue manager is backed out automatically.
2010 (X'07DA')MQRC_DATA_LENGTH_ERRORExplanation: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 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.
Completion Code:MQCC_FAILED
Programmer Response:Correct the parameter.
If the error occurs for an MQ 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.
2011 (X'07DB')MQRC_DYNAMIC_Q_NAME_ERRORExplanation:On the MQOPEN call, a model queue is specified in the ObjectName field of the ObjDesc parameter, but the DynamicQName field is not valid, for one of the following reasons:
- DynamicQName is completely blank (or blank up to the first null character in the field).
- Characters are present that are not valid for a queue name.
- An asterisk is present beyond the 33rd position (and before any null character).
- An asterisk is present followed by characters that are not null and not blank.
This reason code can also sometimes occur when a server application opens the reply queue specified by the ReplyToQ and ReplyToQMgr fields in the MQMD of a message that the server has just received. In this case the reason code indicates that the application that sent the original message placed incorrect values into the ReplyToQ and ReplyToQMgr fields in the MQMD of the original message.
Completion Code:MQCC_FAILED
Programmer Response:Specify a valid name.
2012 (X'07DC')MQRC_ENVIRONMENT_ERRORExplanation:The call is not valid for the current environment.
- On z/OS, one of the following applies:
- An MQCONN or MQCONNX call was issued, but the application has been linked with an adapter that is not supported in the environment in which the application is running. For example, this can arise when the application is linked with the MQ RRS adapter, but the application is running in a DB2 Stored Procedure address space. RRS is not supported in this environment. Stored Procedures wishing to use the MQ RRS adapter must run in a DB2 WLM-managed Stored Procedure address space.
- An MQCMIT or MQBACK call was issued, but the application has been linked with the RRS batch adapter CSQBRSTB. This adapter does not support the MQCMIT and MQBACK calls.
- An MQCMIT or MQBACK call was issued in the CICS or IMS environment.
- The RRS subsystem is not up and running on the z/OS system that ran the application.
- On HP OpenVMS, OS/2, i5/OS, Compaq NonStop Kernel, UNIX systems, and Windows, one of the following applies:
- The application is linked to the wrong libraries (threaded or nonthreaded).
- An MQBEGIN, MQCMIT, or MQBACK call was issued, but an external unit-of-work manager is in use. For example, this reason code occurs on Windows when an MTS object is running as a DTC transaction. This reason code also occurs if the queue manager does not support units of work.
- The MQBEGIN call was issued in an MQ client environment.
- An MQXCLWLN call was issued, but the call did not originate from a cluster workload exit.
Completion Code:MQCC_FAILED
Programmer Response:Do one of the following (as appropriate):
- On z/OS:
- Link the application with the correct adapter.
- Modify the application to use the SRRCMIT and SRRBACK calls in place of the MQCMIT and MQBACK calls. Alternatively, link the application with the RRS batch adapter CSQBRRSI. This adapter supports MQCMIT and MQBACK in addition to SRRCMIT and SRRBACK.
- For a CICS or IMS application, issue the appropriate CICS or IMS call to commit or backout the unit of work.
- Start the RRS subsystem on the z/OS system that is running the application.
- In the other environments:
- Link the application with the correct libraries (threaded or nonthreaded).
- Remove from the application the call that is not supported.
2013 (X'07DD')MQRC_EXPIRY_ERRORExplanation:On an MQPUT or MQPUT1 call, the value specified for the Expiry field in the message descriptor MQMD is not valid.
Completion Code:MQCC_FAILED
Programmer Response:Specify a value that is greater than zero, or the special value MQEI_UNLIMITED.
2014 (X'07DE')MQRC_FEEDBACK_ERRORExplanation:On an MQPUT or MQPUT1 call, the value specified for the Feedback field in the message descriptor MQMD is not valid. The value is not MQFB_NONE, and is outside both the range defined for system feedback codes and the range defined for application feedback codes.
Completion Code:MQCC_FAILED
Programmer Response:Specify MQFB_NONE, or a value in the range MQFB_SYSTEM_FIRST through MQFB_SYSTEM_LAST, or MQFB_APPL_FIRST through MQFB_APPL_LAST.
2016 (X'07E0')MQRC_GET_INHIBITEDExplanation:MQGET calls are currently inhibited for the queue, or for the queue to which this queue resolves.
Completion Code:MQCC_FAILED
Programmer Response:If the system design allows get requests to be inhibited for short periods, retry the operation later.
2017 (X'07E1')MQRC_HANDLE_NOT_AVAILABLEExplanation:An MQOPEN or MQPUT1 call was issued, but the maximum number of open handles allowed for the current task has already been reached. Be aware that when a distribution list is specified on the MQOPEN or MQPUT1 call, each queue in the distribution list uses one handle.
- On z/OS, "task" means a CICS task, a z/OS task, or an IMS-dependent region.
Completion Code:MQCC_FAILED
Programmer Response:Check whether the application is issuing MQOPEN calls without corresponding MQCLOSE calls. If it is, modify the application to issue the MQCLOSE call for each open object as soon as that object is no longer needed.
Also check whether the application is specifying a distribution list containing a large number of queues that are consuming all of the available handles. If it is, increase the maximum number of handles that the task can use, or reduce the size of the distribution list. The maximum number of open handles that a task can use is given by the MaxHandles queue manager attribute.
2018 (X'07E2')MQRC_HCONN_ERRORExplanation:The connection handle Hconn is not valid, for one of the following reasons:
- The parameter pointer is not valid, or (for the MQCONN or MQCONNX call) points to read-only storage. (It is not always possible to detect parameter pointers that are not valid; if not detected, unpredictable results occur.)
- The value specified was not returned by a preceding MQCONN or MQCONNX call.
- The value specified has been made invalid by a preceding MQDISC call.
- The handle is a shared handle that has been made invalid by another thread issuing the MQDISC call.
- The handle is a shared handle that is being used on the MQBEGIN call (only nonshared handles are valid on MQBEGIN).
- The handle is a nonshared handle that is being used a thread that did not create the handle.
- The call was issued in the MTS environment in a situation where the handle is not valid (for example, passing the handle between processes or packages; note that passing the handle between library packages is supported).
Completion Code:MQCC_FAILED
Programmer Response:Ensure that a successful MQCONN or MQCONNX call is performed for the queue manager, and that an MQDISC call has not already been performed for it. Ensure that the handle is being used within its valid scope (see the description of MQCONN in the WebSphere MQ Application Programming Guide).
- On z/OS, also check that the application has been linked with the correct stub; this is CSQCSTUB for CICS applications, CSQBSTUB for batch applications, and CSQQSTUB for IMS applications. Also, the stub used must not belong to a release of the queue manager that is more recent than the release on which the application will run.
2019 (X'07E3')MQRC_HOBJ_ERRORExplanation:The object handle Hobj is not valid, for one of the following reasons:
- The parameter pointer is not valid, or (for the MQOPEN call) points to read-only storage. (It is not always possible to detect parameter pointers that are not valid; if not detected, unpredictable results occur.)
- The value specified was not returned by a preceding MQOPEN call.
- The value specified has been made invalid by a preceding MQCLOSE call.
- The handle is a shared handle that has been made invalid by another thread issuing the MQCLOSE call.
- The handle is a nonshared handle that is being used by a thread that did not create the handle.
- The call is MQGET or MQPUT, but the object represented by the handle is not a queue.
Completion Code:MQCC_FAILED
Programmer Response:Ensure that a successful MQOPEN call is performed for this object, and that an MQCLOSE call has not already been performed for it. Ensure that the handle is being used within its valid scope (see the description of MQOPEN in the WebSphere MQ Application Programming Guide).
2020 (X'07E4')MQRC_INHIBIT_VALUE_ERRORExplanation:On an MQSET call, the value specified for either the MQIA_INHIBIT_GET attribute or the MQIA_INHIBIT_PUT attribute is not valid.
Completion Code:MQCC_FAILED
Programmer Response:Specify a valid value for the InhibitGet or InhibitPut queu attribute.
2021 (X'07E5')MQRC_INT_ATTR_COUNT_ERRORExplanation:On an MQINQ or MQSET call, the IntAttrCount parameter is negative (MQINQ or MQSET), or smaller than the number of integer attribute selectors (MQIA_*) specified in the Selectors parameter (MQSET only). This reason also occurs if the parameter pointer is not valid. (It is not always possible to detect parameter pointers that are not valid; if not detected, unpredictable results occur.)
Completion Code:MQCC_FAILED
Programmer Response:Specify a value large enough for all selected integer attributes.
2022 (X'07E6')MQRC_INT_ATTR_COUNT_TOO_SMALLExplanation:On an MQINQ call, the IntAttrCount parameter is smaller than the number of integer attribute selectors (MQIA_*) specified in the Selectors parameter.
The call completes with MQCC_WARNING, with the IntAttrs array filled in with as many integer attributes as there is room for.
Completion Code:MQCC_WARNING
Programmer Response:Specify a large enough value, unless only a subset of the values is needed.
2023 (X'07E7')MQRC_INT_ATTRS_ARRAY_ERRORExplanation:On an MQINQ or MQSET call, the IntAttrs parameter is not valid. The parameter pointer is not valid (MQINQ and MQSET), or points to read-only storage or to storage that is not as long as indicated by the IntAttrCount parameter (MQINQ only). (It is not always possible to detect parameter pointers that are not valid; if not detected, unpredictable results occur.)
Completion Code:MQCC_FAILED
Programmer Response:Correct the parameter.
2024 (X'07E8')MQRC_SYNCPOINT_LIMIT_REACHEDExplanation:An MQGET, MQPUT, or MQPUT1 call failed because it would have caused the number of uncommitted messages in the current unit of work to exceed the limit defined for the queue manager (see the MaxUncommittedMsgs queue-manager attribute). The number of uncommitted messages is the sum of the following since the start of the current unit of work:
- Messages put by the application with the MQPMO_SYNCPOINT option
- Messages retrieved by the application with the MQGMO_SYNCPOINT option
- Trigger messages and COA report messages generated by the queue manager for messages put with the MQPMO_SYNCPOINT option
- COD report messages generated by the queue manager for messages retrieved with the MQGMO_SYNCPOINT option
- On Compaq NonStop Kernel, this reason code occurs when the maximum number of I/O operations in a single TM/MP transaction has been exceeded.
Completion Code:MQCC_FAILED
Programmer Response:Check whether the application is looping. If it is not, consider reducing the complexity of the application. Alternatively, increase the queue-manager limit for the maximum number of uncommitted messages within a unit of work.
- On z/OS, the limit for the maximum number of uncommitted messages can be changed by using the ALTER QMGR command.
- On i5/OS, the limit for the maximum number of uncommitted messages can be changed by using the CHGMQM command.
- On Compaq NonStop Kernel, the application should cancel the transaction and retry with a smaller number of operations in the unit of work. See the MQSeries for Tandem NonStop Kernel System Management Guide for more details.
2025 (X'07E9')MQRC_MAX_CONNS_LIMIT_REACHEDExplanation:The MQCONN or MQCONNX call was rejected because the maximum number of concurrent connections has been exceeded.
- On z/OS, connection limits are applicable only to TSO and batch requests. The limits are determined by the customer using the following parameters of the CSQ6SYSP macro:
- For TSO: IDFORE
- For batch: IDBACK
For more information, see the WebSphere MQ for z/OS System Setup Guide.
- On HP OpenVMS, OS/2, i5/OS, Compaq NonStop Kernel, UNIX systems, and Windows, this reason code can also occur on the MQOPEN call.
- When using Java applications, a limit to the number of concurrent connections may be defined by the connection manager.
Completion Code:MQCC_FAILED
Programmer Response:Either increase the size of the appropriate parameter value, or reduce the number of concurrent connections.
2026 (X'07EA')MQRC_MD_ERRORExplanation:The MQMD structure is not valid, for one of the following reasons:
- The StrucId field is not MQMD_STRUC_ID.
- The Vfield specifies a value that is not valid or not supported.
- The 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 queue manager cannot copy the changed structure to application storage, even though the call is successful. This can occur, for example, if the pointer points to read-only storage.
Completion Code:MQCC_FAILED
Programmer Response:Ensure that input fields in the MQMD structure are set correctly.
2027 (X'07EB')MQRC_MISSING_REPLY_TO_QExplanation:On an MQPUT or MQPUT1 call, the ReplyToQ field in the message descriptor MQMD is blank, but one or both of the following is true:
- A reply was requested (that is, MQMT_REQUEST was specified in the MsgType field of the message descriptor).
- A report message was requested in the Report field of the message descriptor.
Completion Code:MQCC_FAILED
Programmer Response:Specify the name of the queue to which the reply message or report message is to be sent.
2029 (X'07ED')MQRC_MSG_TYPE_ERRORExplanation:Either:
- On an MQPUT or MQPUT1 call, the value specified for the MsgType field in the message descriptor (MQMD) is not valid.
- A message processing program received a message that does not have the expected message type. For example, if the WebSphere MQ command server receives a message which is not a request message (MQMT_REQUEST) then it rejects the request with this reason code.
Completion Code:MQCC_FAILED
Programmer Response:Specify a valid value for the MsgType field. In the case where a request is rejected by a message processing program, refer to the documentation for that program for details of the message types that it supports.
2030 (X'07EE')MQRC_MSG_TOO_BIG_FOR_QExplanation:An MQPUT or MQPUT1 call was issued to put a message on a queue, but the message was too long for the queue and MQMF_SEGMENTATION_ALLOWED was not specified in the MsgFlags field in MQMD. If segmentation is not allowed, the length of the message cannot exceed the lesser of the queue MaxMsgLength attribute and queue-manager MaxMsgLength attribute.
- On z/OS, the queue manager does not support the segmentation of messages; if MQMF_SEGMENTATION_ALLOWED is specified, it is accepted but ignored.
This reason code can also occur when MQMF_SEGMENTATION_ALLOWED is specified, but the nature of the data present in the message prevents the queue manager splitting it into segments that are small enough to place on the queue:
- For a user-defined format, the smallest segment that the queue manager can create is 16 bytes.
- For a built-in format, the smallest segment that the queue manager can create depends on the particular format, but is greater than 16 bytes in all cases other than MQFMT_STRING (for MQFMT_STRING the minimum segment size is 16 bytes).
MQRC_MSG_TOO_BIG_FOR_Q can also occur in the Feedback field in the message descriptor of a report message; in this case it indicates that the error was encountered by a message channel agent when it attempted to put the message on a remote queue.
Completion Code:MQCC_FAILED
Programmer Response:Check whether the BufferLength parameter is specified correctly; if it is, do one of the following:
- Increase the value of the queue's MaxMsgLength attribute; the queue-manager's MaxMsgLength attribute may also need increasing.
- Break the message into several smaller messages.
- Specify MQMF_SEGMENTATION_ALLOWED in the MsgFlags field in MQMD; this will allow the queue manager to break the message into segments.
2031 (X'07EF')MQRC_MSG_TOO_BIG_FOR_Q_MGRExplanation:An MQPUT or MQPUT1 call was issued to put a message on a queue, but the message was too long for the queue manager and MQMF_SEGMENTATION_ALLOWED was not specified in the MsgFlags field in MQMD. If segmentation is not allowed, the length of the message cannot exceed the lesser of the queue-manager MaxMsgLength attribute and queue MaxMsgLength attribute.
This reason code can also occur when MQMF_SEGMENTATION_ALLOWED is specified, but the nature of the data present in the message prevents the queue manager splitting it into segments that are small enough for the queue-manager limit:
- For a user-defined format, the smallest segment that the queue manager can create is 16 bytes.
- For a built-in format, the smallest segment that the queue manager can create depends on the particular format, but is greater than 16 bytes in all cases other than MQFMT_STRING (for MQFMT_STRING the minimum segment size is 16 bytes).
MQRC_MSG_TOO_BIG_FOR_Q_MGR can also occur in the Feedback field in the message descriptor of a report message; in this case it indicates that the error was encountered by a message channel agent when it attempted to put the message on a remote queue.
This reason also occurs if a channel, through which the message is to pass, has restricted the maximum message length to a value that is actually less than that supported by the queue manager, and the message length is greater than this value.
- On z/OS, this return code is issued only if you are using CICS for distributed queuing. Otherwise, MQRC_MSG_TOO_BIG_FOR_CHANNEL is issued.
Completion Code:MQCC_FAILED
Programmer Response:Check whether the BufferLength parameter is specified correctly; if it is, do one of the following:
- Increase the value of the queue-manager's MaxMsgLength attribute; the queue's MaxMsgLength attribute may also need increasing.
- Break the message into several smaller messages.
- Specify MQMF_SEGMENTATION_ALLOWED in the MsgFlags field in MQMD; this will allow the queue manager to break the message into segments.
- Check the channel definitions.
2033 (X'07F1')MQRC_NO_MSG_AVAILABLEExplanation:An MQGET call was issued, but there is no message on the queue satisfying the selection criteria specified in MQMD (the MsgId and CorrelId fields), and in MQGMO (the Options and MatchOptions fields). Either the MQGMO_WAIT option was not specified, or the time interval specified by the WaitInterval field in MQGMO has expired. This reason is also returned for an MQGET call for browse, when the end of the queue has been reached.
This reason code can also be returned by the mqGetBag and mqExecute calls. mqGetBag is similar to MQGET. For the mqExecute call, the completion code can be either MQCC_WARNING or MQCC_FAILED:
- If the completion code is MQCC_WARNING, some response messages were received during the specified wait interval, but not all. The response bag contains system-generated nested bags for the messages that were received.
- If the completion code is MQCC_FAILED, no response messages were received during the specified wait interval.
Completion Code:MQCC_WARNING or MQCC_FAILED
Programmer Response:If this is an expected condition, no corrective action is required.
If this is an unexpected condition, check that:
- The message was put on the queue successfully.
- The unit of work (if any) used for the MQPUT or MQPUT1 call was committed successfully.
- The options controlling the selection criteria are specified correctly. All of the following can affect the eligibility of a message for return on the MQGET call:
- MQGMO_LOGICAL_ORDER
- MQGMO_ALL_MSGS_AVAILABLE
- MQGMO_ALL_SEGMENTS_AVAILABLE
- MQGMO_COMPLETE_MSG
- MQMO_MATCH_MSG_ID
- MQMO_MATCH_CORREL_ID
- MQMO_MATCH_GROUP_ID
- MQMO_MATCH_MSG_SEQ_NUMBER
- MQMO_MATCH_OFFSET
- Value of MsgId field in MQMD
- Value of CorrelId field in MQMD
Consider waiting longer for the message.
2034 (X'07F2')MQRC_NO_MSG_UNDER_CURSORExplanation:An MQGET call was issued with either the MQGMO_MSG_UNDER_CURSOR or the MQGMO_BROWSE_MSG_UNDER_CURSOR option. However, the browse cursor is not positioned at a retrievable message. This is caused by one of the following:
- The cursor is positioned logically before the first message (as it is before the first MQGET call with a browse option has been successfully performed).
- The message the browse cursor was positioned on has been locked or removed from the queue (probably by some other application) since the browse operation was performed.
- The message the browse cursor was positioned on has expired.
Completion Code:MQCC_FAILED
Programmer Response:Check the application logic. This may be an expected reason if the application design allows multiple servers to compete for messages after browsing. Consider also using the MQGMO_LOCK option with the preceding browse MQGET call.
2035 (X'07F3')MQRC_NOT_AUTHORIZEDExplanation:The user is not authorized to perform the operation attempted:
- On an MQCONN or MQCONNX call, the user is not authorized to connect to the queue manager.
- On z/OS, for CICS applications, MQRC_CONNECTION_NOT_AUTHORIZED is issued instead.
- On an MQOPEN or MQPUT1 call, the user is not authorized to open the object for the option(s) specified.
- On z/OS, if the object being opened is a model queue, this reason also arises if the user is not authorized to create a dynamic queue with the required name.
- On an MQCLOSE call, the user is not authorized to delete the object, which is a permanent dynamic queue, and the Hobj parameter specified on the MQCLOSE call is not the handle returned by the MQOPEN call that created the queue.
- On a command, the user is not authorized to issue the command, or to access the object it specifies.
This reason code can also occur in the Feedback field in the message descriptor of a report message; in this case it indicates that the error was encountered by a message channel agent when it attempted to put the message on a remote queue.
Completion Code:MQCC_FAILED
Programmer Response:Ensure that the correct queue manager or object was specified, and that appropriate authority exists.
2036 (X'07F4')MQRC_NOT_OPEN_FOR_BROWSEExplanation:An MQGET call was issued with one of the following options:
- MQGMO_BROWSE_FIRST
- MQGMO_BROWSE_NEXT
- MQGMO_BROWSE_MSG_UNDER_CURSOR
- MQGMO_MSG_UNDER_CURSOR
but the queue had not been opened for browse.
Completion Code:MQCC_FAILED
Programmer Response:Specify MQOO_BROWSE when the queue is opened.
2037 (X'07F5')MQRC_NOT_OPEN_FOR_INPUTExplanation:An MQGET call was issued to retrieve a message from a queue, but the queue had not been opened for input.
Completion Code:MQCC_FAILED
Programmer Response:Specify one of the following when the queue is opened:
- MQOO_INPUT_SHARED
- MQOO_INPUT_EXCLUSIVE
- MQOO_INPUT_AS_Q_DEF
2038 (X'07F6')MQRC_NOT_OPEN_FOR_INQUIREExplanation:An MQINQ call was issued to inquire object attributes, but the object had not been opened for inquire.
Completion Code:MQCC_FAILED
Programmer Response:Specify MQOO_INQUIRE when the object is opened.
2039 (X'07F7')MQRC_NOT_OPEN_FOR_OUTPUTExplanation:An MQPUT call was issued to put a message on a queue, but the queue had not been opened for output.
Completion Code:MQCC_FAILED
Programmer Response:Specify MQOO_OUTPUT when the queue is opened.
2040 (X'07F8')MQRC_NOT_OPEN_FOR_SETExplanation:An MQSET call was issued to set queue attributes, but the queue had not been opened for set.
Completion Code:MQCC_FAILED
Programmer Response:Specify MQOO_SET when the object is opened.
2041 (X'07F9')MQRC_OBJECT_CHANGEDExplanation:Object definitions that affect this object have been changed since the Hobj handle used on this call was returned by the MQOPEN call. See the description of MQOPEN in the WebSphere MQ Application Programming Guide for more information.
This reason does not occur if the object handle is specified in the Context field of the PutMsgOpts parameter on the MQPUT or MQPUT1 call.
Completion Code:MQCC_FAILED
Programmer Response:Issue an MQCLOSE call to return the handle to the system. It is then usually sufficient to reopen the object and retry the operation. However, if the object definitions are critical to the application logic, an MQINQ call can be used after reopening the object, to obtain the new values of the object attributes.
2042 (X'07FA')MQRC_OBJECT_IN_USEExplanation:An MQOPEN call was issued, but the object in question has already been opened by this or another application with options that conflict with those specified in the Options parameter. This arises if the request is for shared input, but the object is already open for exclusive input; it also arises if the request is for exclusive input, but the object is already open for input (of any sort).
MCAs for receiver channels, or the intra-group queuing agent (IGQ agent), may keep the destination queues open even when messages are not being transmitted; this results in the queues appearing to be "in use". Use the MQSC command DISPLAY QSTATUS to find out who is keeping the queue open.
- On z/OS, this reason can also occur for an MQOPEN or MQPUT1 call, if the object to be opened (which can be a queue, or for MQOPEN a namelist or process object) is in the process of being deleted.
Completion Code:MQCC_FAILED
Programmer Response: