To disconnect from the WebSphere MQ queue manager, use the following code:
CALL 'MQDISC'
    USING by reference HCONN, COMPCODE, REASON.
            in the following modes:
INPUT Mode:
| Variable | Description | Definition | 
|---|---|---|
| HCONN | S9(9) BINARY handle to queue manager | User-defined | 
OUTPUT Mode:
| Variable | Description | Definition | 
|---|---|---|
| COMPCODE | S9(9) BINARY returns the completion code | User-defined | 
| REASON | S9(9) BINARY returns the reason | User-defined |