Learn it on Mainframe Path. Do it with Mainframe KIT.Learn on Mainframe Path ▸
Mainframe KIT ● Nothing leaves this tab

2042

MQRC_OBJECT_IN_USE (X'07FA')MQ REASON CODE · CHECKED 2026-11-14
Checked against IBM documentation

An MQOPEN failed because the object is already open with options that conflict with the requested ones, such as exclusive versus shared input.

QUICK ANSWER

An MQOPEN failed because the object is already open with options that conflict with the requested ones, such as exclusive versus shared input.

LIKELY CAUSES, IN THE ORDER OF THIS ENTRY

  1. Shared input is requested but the object is already open for exclusive input.
  2. Exclusive input is requested but the object is already open for input of any sort.
  3. Receiver-channel MCAs or the intra-group queuing agent keep the destination queue open even when no messages flow.
  4. The queue definition says NOSHARE, which makes the input handle exclusive whatever the application asks; this is the default on z/OS.
  5. On z/OS, the object is in the process of being deleted.

CHECKED 14 Nov 2026 IBM: 2042 (07FA) (RC2042): MQRC_OBJECT_IN_USE | IBM MQ 10.0.x

MOST LIKELY

Shared input is requested but the object is already open for exclusive input.

FIRST CHECK

Use the MQSC command DISPLAY QSTATUS to find who has the queue open.

TRY IT ▸

Site search

What it means

The object was already opened by this or another application with options that conflict with those on this MQOPEN. The call fails with completion code MQCC_FAILED.

Typical causes

  • Shared input is requested but the object is already open for exclusive input.
  • Exclusive input is requested but the object is already open for input of any sort.
  • Receiver-channel MCAs or the intra-group queuing agent keep the destination queue open even when no messages flow.
  • The queue definition says NOSHARE, which makes the input handle exclusive whatever the application asks; this is the default on z/OS.
  • On z/OS, the object is in the process of being deleted.

How to fix it

  1. Use the MQSC command DISPLAY QSTATUS to find who has the queue open.
  2. Check the queue's SHARE/NOSHARE setting and the open options (MQOO_INPUT_SHARED, or MQOO_INPUT_AS_Q_DEF with DEFSOPT).
  3. Design the application to wait and retry, or take other action, as your system design specifies.

Example

Illustrative only; names and values are invented.

MQOPEN failed  CompCode=2  Reason=2042