The API exit sample program
The sample API exit generates an MQI trace to a user-specified file with a prefix defined in the MQAPI_TRACE_LOGFILE environment variable.
For more information about API exits, see Writing and compiling API exits.
- Source
- amqsaxe0.c
- Binary
- amqsaxe
Configuring for the sample exit
- Add the following to the qm.ini file.
- Platforms other than Windows
-
whereApiExitLocal: Sequence=100 Function=EntryPoint Module=
MQ_INSTALLATION_PATH
/samp/bin/amqsaxe Name=SampleApiExitMQ_INSTALLATION_PATH
represents the directory where IBM® WebSphere MQ is installed. - Windows
-
whereApiExitLocal: Sequence=100 Function=EntryPoint Module=
MQ_INSTALLATION_PATH
\Tools\c\Samples\bin\amqsaxe Name=SampleApiExitMQ_INSTALLATION_PATH
represents the directory where IBM WebSphere MQ is installed.
- Set the environment variable
MQAPI_TRACE_LOGFILE=/tmp/MqiTrace
- Run your application.
Output files are created in the /tmp directory with names like:
MqiTrace.<pid>.<tid>.log