Dynamically calling the IBM MQ stub
Instead of link-editing the IBM MQ stub program with your object code, we can dynamically call the stub from within your program.
We can do this in the batch, IMS, and CICSĀ® environments. This facility is not supported in the RRS environment. If our 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 we cannot use the same programs in other environments
- 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 Set 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.MQI call | Batch (non-RRS) dynamic call names | CICS dynamic call names | IMS dynamic call names |
---|---|---|---|
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 |
- Batch and COBOL: see Figure 1
- CICS and COBOL: see Figure 2
- IMS and COBOL: see Figure 3
- Batch and assembler: see Figure 4
- CICS and assembler: see Figure 5
- IMS and assembler: see Figure 6
- Batch and C: Figure 7
- CICS and C: see Figure 8
- IMS and C: see Figure 9
- Batch and PL/I: see Figure 10
- IMS and PL/I: see Figure 11