MQOPEN or MQCLOSE used an option that is not valid for the type of object or queue being opened or closed.
QUICK ANSWER
MQOPEN or MQCLOSE used an option that is not valid for the type of object or queue being opened or closed.
LIKELY CAUSES, IN THE ORDER OF THIS ENTRY
An option is inappropriate for the object type, for example MQOO_OUTPUT for a process object.
An option is unsupported for the queue type, for example MQOO_INQUIRE on a remote queue that has no local definition.
An input, browse, inquire or set option is used while the queue name resolves through a cell directory, or ObjectQMgrName names a local remote-queue definition whose RemoteQMgrName is the local queue manager.
A namelist, process or queue manager object is opened while ObjectQMgrName is neither blank nor the local queue manager name.
MQCLOSE uses MQCO_DELETE or MQCO_DELETE_PURGE on a queue that is not dynamic.
On MQOPEN or MQCLOSE, an option was given that does not suit the object or queue type. The completion code is MQCC_FAILED.
Typical causes
An option is inappropriate for the object type, for example MQOO_OUTPUT for a process object.
An option is unsupported for the queue type, for example MQOO_INQUIRE on a remote queue that has no local definition.
An input, browse, inquire or set option is used while the queue name resolves through a cell directory, or ObjectQMgrName names a local remote-queue definition whose RemoteQMgrName is the local queue manager.
A namelist, process or queue manager object is opened while ObjectQMgrName is neither blank nor the local queue manager name.
MQCLOSE uses MQCO_DELETE or MQCO_DELETE_PURGE on a queue that is not dynamic.
How to fix it
Specify the correct option for the object or queue type.
On MQOPEN, check that ObjectQMgrName is set correctly.
On MQCLOSE, correct the option or change the definition type of the model queue used to create the queue.