How to write an API exit

 

You write exits using the C programming language. To help you to do so, we provide the source of a sample exit, amqsaxe0.c, that generates trace entries to a file that you specify. Use this as your starting point when writing exits.

Exits are available for every API call. Within API exits, the calls take the general form:

MQ_call_EXIT (parameters, context, ApiCallParameters)
where call is the MQI call name without the MQ prefix; for example, PUT, GET, and so on. The parameters control the function of the exit, context describes the context in which the API exit was called, and ApiCallParameters represent the parameters to the MQI call.

For more information about using the sample exit that we supply, see The API exit sample program. For reference information on the API exit calls, external control blocks, and associated topics, see Reference information.

 

Parent topic:

How you use API exits


fg14140_