2045 (07FD) (RC2045): MQRC_OPTION_NOT_VALID_FOR_TYPE
Explanation
On an MQOPEN or MQCLOSE call, an option is specified that is not valid for the type of object or queue being opened or closed.
For the MQOPEN call, this includes the following cases:- An option that is inappropriate for the object type (for example, MQOO_OUTPUT for an MQOT_PROCESS object).
- An option that is unsupported for the queue type (for example, MQOO_INQUIRE for a remote queue that has no local definition).
- One or more of the following options:
- MQOO_INPUT_AS_Q_DEF
- MQOO_INPUT_SHARED
- MQOO_INPUT_EXCLUSIVE
- MQOO_BROWSE
- MQOO_INQUIRE
- MQOO_SET
when either:
- the queue name is resolved through a cell directory, or
- ObjectQMgrName in the object descriptor specifies the name of a local definition of a remote queue (to specify a queue manager alias), and the queue named in the RemoteQMgrName attribute of the definition is the name of the local queue manager.
For the MQCLOSE call, this includes the following case:
- The MQCO_DELETE or MQCO_DELETE_PURGE option when the queue is not a dynamic queue.
This reason code can also occur on the MQOPEN call when the object being opened is of type MQOT_NAMELIST, MQOT_PROCESS, or MQOT_Q_MGR, but the ObjectQMgrName field in MQOD is neither blank nor the name of the local queue manager.
Completion code
MQCC_FAILED
Programmer response
Specify the correct option. For the MQOPEN call, ensure that the ObjectQMgrName field is set correctly. For the MQCLOSE call, either correct the option or change the definition type of the model queue that is used to create the new queue.
Parent topic: API reason codes