Assembler example: Disconnecting from a queue manager
This example demonstrates how to use the MQDISC call to disconnect a program from a queue manager in z/OS® batch.
This extract is not taken from the sample applications supplied with IBM® MQ.
For the names and locations of the sample applications, see Using the sample procedural programs for z/OS.
⋮
*
* ISSUE MQI DISC REQUEST USING REENTRANT FORM
* OF CALL MACRO
*
* HCONN WAS SET BY A PREVIOUS MQCONN REQUEST
* R5 = WORK REGISTER
*
DISC DS 0H
CALL MQDISC, X
(HCONN, X
COMPCODE, X
REASON), X
VL,MF=(E,CALLLST)
*
LA R5,MQCC_OK
C R5,COMPCODE
BNE BADCALL
⋮
BADCALL DS 0H
⋮
* CONSTANTS
*
CMQA
*
* WORKING STORAGE (RE-ENTRANT)
*
WEG3 DSECT
*
CALLLST CALL ,(0,0,0,0,0,0,0,0,0,0,0),VL,MF=L
*
HCONN DS F
COMPCODE DS F
REASON DS F
*
*
LEG3 EQU *-WKEG3
END