MainframeKit

2019

MQRC_HOBJ_ERROR (X'07E3')MQ REASON CODE

The object handle passed to MQGET, MQPUT, MQINQ or similar is not valid, usually because the queue was never opened or was already closed.

MOST LIKELY

MQOPEN was not issued, or it failed and the program used the handle anyway.

FIRST CHECK

Check the result of MQOPEN and stop or retry if it failed.

TRY IT ▸

MainframeKit assistant

What it means

Calls such as MQGET and MQPUT need the object handle returned by MQOPEN. 2019 means the value passed does not refer to an open object for this connection. Like 2018, this points at the program's logic, not the queue manager.

Typical causes

  • MQOPEN was not issued, or it failed and the program used the handle anyway.
  • The queue was closed with MQCLOSE and the old handle was reused.
  • Another thread closed a shared handle, or a thread used a non-shared handle it did not create.
  • The handle refers to an object that is not a queue, for example on an MQGET.
  • Storage holding the handle was overwritten.

How to fix it

  1. Check the result of MQOPEN and stop or retry if it failed.
  2. Trace where the handle is set, closed and reused, especially across reconnect logic.
  3. Review threading: each thread should use handles it is allowed to use.
  4. After an MQRC 2009 reconnect, open the queues again; old handles do not survive.

Example

Illustrative only; names and values are invented.

MQGET failed  CompCode=2  Reason=2019  Hobj=0