Configuring for the sample exit

  1. Add the following to the qm.ini file (or the registry on Windows(R)). See the WebSphere MQ System Administration Guide for how to do this.
    Platforms other than Windows
    ApiExitLocal: Sequence=100
    Function=EntryPoint
    Module=install_dir/samp/bin/amqsaxe
    Name=SampleApiExit
    where install_dir is the directory where WebSphere MQ was installed.
    Windows
    ApiExitLocal: Sequence=100
    Function=EntryPoint
    Module=install_dir\Tools\c\Samples\bin\amqsaxe
    Name=SampleApiExit
    where install_dir is the directory where WebSphere MQ was installed.
  2. Set the environment variable
    MQS_TRACE_LOGFILE=/tmp/MqiTrace
  3. Run your application.

    Output files will appear in the /tmp directory with names like: MqiTrace.<pid>.<tid>.log