IBM MQ 8.0 was EOS 30th April 2020.Click EOS notice for more details
Dynamically calling the IBM MQ stub
Instead of link-editing the IBM® MQ stub program with your object code, you can dynamically call the stub from within your program.
You can do this in the batch, IMS, and CICS® environments. This facility is not supported in the RRS environment. If your application program uses RRS to coordinate updates, see RRS Considerations.
However, this method:
Increases the complexity of your programs
Increases the storage required by your programs at execution time
Reduces the performance of your programs
Means that you cannot use the same programs in other environments
If you call the stub dynamically, the appropriate stub program and its aliases must be available at execution time. To ensure this, include the IBM MQ for z/OS® data set SCSQLOAD:
For batch and IMS
In the STEPLIB concatenation of the JCL
For CICS
In the CICS DFHRPL concatenation
For IMS, ensure that the library containing the dynamic stub (built as described in the information about installing the IMS adapter in Setting up the IMS adapter ) is ahead of the data set SCSQLOAD in the STEPLIB concatenation of the region JCL.
Use the names shown in Table 1 when you call the stub dynamically. In PL/I, only declare the call names used in your program.
Table 1. Call names for dynamic linking
MQI call
Dynamic call name
Batch (non-RRS)
CICS
IMS
MQBACK
CSQBBACK
not supported
Not supported
MQBUFMH
CSQBBFMH
CSQCBFMH 1
MQBUFMH
MQCB
CSQBCB
CSQCCB 1
Not supported
MQCLOSE
CSQBCLOS
CSQCCLOS
MQCLOSE
MQCMIT
CSQBCOMM
not supported
Not supported
MQCONN
CSQBCONN
CSQCCONN
MQCONN
MQCONNX
CSQBCONX
CSQCCONX
MQCONNX
MQCRTMH
CSQBCTMH
CSQCCTMH 1
MQCRTMH
MQCTL
CSQBCTL
CSQCCTL 1
Not supported
MQDISC
CSQBDISC
CSQCDISC
MQDISC
MQDLTMH
CSQBDTMH
CSQCDTMH 1
MQDLTMH
MQDLTMP
CSQBDTMP
CSQCDTMP 1
MQDLTMP
MQGET
CSQBGET
CSQCGET
MQGET
MQINQ
CSQBINQ
CSQCINQ
MQINQ
MQINQMP
CSQBIQMP
CSQCIQMP 1
MQINQMP
MQMHBUF
CSQBMHBF
CSQCMHBF 1
MQMHBUF
MQOPEN
CSQBOPEN
CSQCOPEN
MQOPEN
MQPUT
CSQBPUT
CSQCPUT
MQPUT
MQPUT1
CSQBPUT1
CSQCPUT1
MQPUT1
MQSET
CSQBSET
CSQCSET
MQSET
MQSETMP
CSQBSTMP
CSQCSTMP 1
MQSETMP
MQSTAT
CSQBSTAT
CSQCSTAT 1
MQSTAT
MQSUB
CSQBSUB
CSQCSUB 1
MQSUB
MQSUBRQ
CSQBSUBR
CSQCSUBR 1
MQSUBRQ
Note: 1. These API calls are available only when using CICS TS 3.2 or later and the CSQCSTUB shipped with CICS must be used. For CICS TS 3.2, APAR PK66866 must be applied. For CICS TS 4.1, APAR PK89844 must be applied.
For examples of how to use this technique, see the following figures: