The API-crossing exit
An API-crossing exit is a program that monitors or modifies the function of MQI calls issued by CICS applications on z/OS .
Note: The information in this section applies only to CICS applications on z/OS.The API-crossing exit program is invoked by the CICS adapter and runs in the CICS address space.
The API-crossing exit is invoked for the following MQI calls only:- MQBUFMH
- MQCB
- MQCB_FUNCTION
- MQCLOSE
- MQCRTMH
- MQCTL
- MQDLTMH
- MQGET
- MQINQ
- MQOPEN
- MQPUT
- MQPUT1
- MQSET
- MQSTAT
- MQSUB
- MQSUBRQ
For each MQI call, it is invoked once before the processing of the call has started and once after the processing of the call has been completed.
The exit program can determine the name of an MQI call and can inspect and modify any of the parameters on the call. If it is invoked before an MQI call is processed, it can suppress the call completely.
The exit program can use any of the APIs that a CICS task-related user exit can use; for example, the IMS, Db2, and CICS APIs. It can also use any of the MQI calls except MQCONN, MQCONNX, and MQDISC. However, any MQI calls issued by the exit program do not invoke the exit program a second time.
We can write an API-crossing exit in any programming language supported by IBM MQ for z/OS.
Before an API-crossing exit can be used, the exit program load module must be available when the CICS adapter connects to a queue manager. The load module is a CICS program that must be named CSQCAPX and reside in a library in the DFHRPL concatenation sequence. CSQCAPX must be defined in the CICS system definition file (CSD), and the program must be enabled.
An API-crossing exit can be managed using the CICS adapter control panels, CKQC. When CSQCAPX is loaded, a confirmation message is written to the adapter control panels or to the system console. The adapter control panels can also be used to enable or disable the exit program.
For more information about how to write and implement an API-crossing exit, see The CICS-IBM MQ Adapter
section in the CICS Transaction Server
for z/OS Version 4.1 product documentation. See CICS Transaction Server for z/OS Version 4.1, The CICS-IBM MQ adapter.