Writing your own exit program

 

We can use the sample API-crossing exit program (CSQCAPX) that is supplied with WebSphere MQ for z/OS as a framework for your own program. This is described in topic The sample API-crossing exit program, CSQCAPX.

When writing an exit program, to find the name of an MQI call issued by an application, examine the ExitCommand field of the MQXP structure. To find the number of parameters on the call, examine the ExitParmCount field. We can use the 16-byte ExitUserArea field to store the address of any dynamic storage that the application obtains. This field is retained across invocations of the exit and has the same lifetime as a CICS task.

Your exit program can suppress execution of an MQI call by returning MQXCC_SUPPRESS_FUNCTION or MQXCC_SKIP_FUNCTION in the ExitResponse field. To allow the call to be executed (and the exit program to be reinvoked after the call has completed), your exit program must return MQXCC_OK.

When invoked after an MQI call, an exit program can inspect and modify the completion and reason codes set by the call.

 

Parent topic:

The API-crossing exit for z/OS


fg15300_