The sample API-crossing exit program, CSQCAPX
The sample exit program is supplied as an assembler-language program. The source file (CSQCAPX) is supplied in the library thlqual.SCSQASMS (where thlqual is the high-level qualifier used by your installation). This source file includes pseudocode that describes the program logic.
The sample program contains initialization code and a layout that we can use when writing your own exit programs.
The sample shows how to:- Set up the exit parameter block
- Address the call and exit parameter blocks
- Determine for which MQI call the exit is being invoked
- Determine whether the exit is being invoked before or after processing of the MQI call
- Put a message on a CICS temporary storage queue
- Use the macro DFHEIENT for dynamic storage acquisition to maintain reentrancy
- Use DFHEIBLK for the CICS exec interface control block
- Trap error conditions
- Return control to the caller
Design of the sample exit program
The sample exit program writes messages to a CICS temporary storage queue (CSQ1EXIT) to show the operation of the exit.
The messages show whether the exit is being invoked before or after the MQI call. If the exit is invoked after the call, the message contains the completion code and reason code returned by the call. The sample uses named constants from the CMQXPA macro to check on the type of entry (that is, before or after the call).
The sample does not perform any monitoring function, but simply places time-stamped messages into a CICS queue indicating the type of call it is processing. This provides an indication of the performance of the MQI, as well as the correct functioning of the exit program.
Note: The sample exit program issues six EXEC CICS calls for each MQI call that is made while the program is running. If we use this exit program, IBM MQ for z/OS performance is degraded. Parent topic: The API-crossing exit for z/OS