The problem described here occurs on an iSeries system.

I have a program that is continuously monitoring a message queue, i.e.
the wait time for the MQGet is indefinite. The MQGet resides in a
service program. When a message is retrieved from the queue, all sorts
of processing take place. In some cases, an e-mail is sent by a program
some levels deeper in the call stack. When this happens, the connection
of the job to the message queue is suddenly gone. On the screen Work
with Queue Status, the job is no longer listed. When the job returns to
the MQGet, it fails with reason code 2018. So far, I have not succeeded
in pinpointing the exact location where the job gets disconnected.

Does anyone know possible reasons for the job being disconnected? This
might help me in looking for the cause of the problem.

The activation group of the MQGet (activation group QMQM) still exists
when the job returns to the MQGet, so that possibility can be ruled
out.

Thanks in advance.

Ewout