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
- Check the result of MQOPEN and stop or retry if it failed.
- Trace where the handle is set, closed and reused, especially across reconnect logic.
- Review threading: each thread should use handles it is allowed to use.
- 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