Instead of link-editing the WebSphere 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 by programs using PL/I in the CICS environment and it is not supported in the RRS environment.
However, this method:
If you call the stub dynamically, the appropriate stub program and its
aliases must be available at execution time. To ensure this, include
the WebSphere 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, you must ensure that the library containing the dynamic stub (built as described in the information about installing the IMS adapter in the WebSphere MQ for z/OS System Setup Guide) is ahead of the data set SCSQLOAD in the STEPLIB concatenation of the region JCL.
Use the names shown in Table 30 when you call the stub dynamically. In PL/I, only
declare the call names used in your program.
Table 30. Call names for dynamic linking
MQI call | Dynamic call name | ||
---|---|---|---|
| Batch (non-RRS) | CICS | IMS |
MQBACK | CSQBBACK | not supported | not supported |
MQCMIT | CSQBCOMM | not supported | not supported |
MQCLOSE | CSQBCLOS | CSQCCLOS | MQCLOSE |
MQCONN | CSQBCONN | CSQCCONN | MQCONN |
MQCONNX | CSQBCONX | CSQCCONX | MQCONNX |
MQDISC | CSQBDISC | CSQCDISC | MQDISC |
MQGET | CSQBGET | CSQCGET | MQGET |
MQINQ | CSQBINQ | CSQCINQ | MQINQ |
MQOPEN | CSQBOPEN | CSQCOPEN | MQOPEN |
MQPUT | CSQBPUT | CSQCPUT | MQPUT |
MQPUT1 | CSQBPUT1 | CSQCPUT1 | MQPUT1 |
MQSET | CSQBSET | CSQCSET | MQSET |
For examples of how to use this technique, see the following figures:
Batch and COBOL | Figure 23 |
CICS and COBOL | Figure 24 |
IMS and COBOL | Figure 25 |
Batch and assembler | Figure 26 |
CICS and assembler | Figure 27 |
IMS and assembler | Figure 28 |
Batch and C | Figure 29 |
CICS and C | Figure 30 |
IMS and C | Figure 31 |
Batch and PL/I | Figure 32 |
IMS and PL/I | Figure 33 |
Figure 23. Dynamic linking using COBOL in the batch environment
|
Figure 24. Dynamic linking using COBOL in the CICS environment
|
Figure 25. Dynamic linking using COBOL in the IMS environment
|
Figure 26. Dynamic linking using assembler language in the batch environment
|
Figure 27. Dynamic linking using assembler language in the CICS environment
|
Figure 28. Dynamic linking using assembler language in the IMS environment
|
Figure 29. Dynamic linking using C language in the batch environment
|
Figure 30. Dynamic linking using C language in the CICS environment
|
Figure 31. Dynamic linking using C language in the IMS environment
|
Figure 32. Dynamic linking using PL/I in the batch environment
|
Figure 33. Dynamic linking using PL/I in the IMS environment
|