Disconnecting programs from a queue manager using MQDISC

 

When a program that has connected to a queue manager using the MQCONN or MQCONNX call has finished all interaction with the queue manager, it breaks the connection using the MQDISC call, except:

As input to the MQDISC call, supply the connection handle (Hconn) that was returned by MQCONN or MQCONNX when you connected to the queue manager.

Except on CICS on z/OS, after MQDISC is called the connection handle (Hconn) is no longer valid, and we cannot issue any further MQI calls until you call MQCONN or MQCONNX again. MQDISC does an implicit MQCLOSE for any objects that are still open using this handle.

If you use MQCONNX to connect on WebSphere MQ for z/OS, MQDISC also ends the scope of the connection tag established by the MQCONNX. However, in a CICS, IMS™, or RRS application, if there is an active unit of recovery associated with a connection tag, the MQDISC is rejected with a reason code of MQRC_CONN_TAG_NOT_RELEASED.

Descriptions of the parameters are given in the description of the MQDISC call in the Application Programming Reference.

 

Parent topic:

Connecting to and disconnecting from a queue manager


fg12100_