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 WebSphere MQ.
%INCLUDE SYSLIB(CMQP); %INCLUDE SYSLIB(CMQEPP); : /****************************************************/ /* WORKING STORAGE DECLARATIONS */ /****************************************************/ DCL COMPCODE BINARY FIXED (31); DCL REASON BINARY FIXED (31); DCL HCONN BINARY FIXED (31); ⋮ /****************************************************/ /* DISCONNECT FROM THE QUEUE MANAGER */ /****************************************************/ CALL MQDISC (HCONN, /* CONNECTION HANDLE */ COMPCODE, /* COMPLETION CODE */ REASON); /* REASON CODE */ /**************************************************************/ /* TEST THE COMPLETION CODE OF THE DISCONNECT CALL. */ /* IF THE CALL HAS FAILED ISSUE AN ERROR MESSAGE */ /* SHOWING THE COMPLETION CODE AND THE REASON CODE. */ /**************************************************************/ IF COMPCODE ¬= MQCC_OK THEN DO; ⋮ CALL ERROR_ROUTINE; END;
Parent topic:
PL/I examples
fg19200_