The exit is a dynamically loaded object that must be written in C. To ensure that it can be loaded when required, put 32-bit exits in /var/mqm/exits and 64-bit exits in /var/mqm/exits64. These are the default paths for exits in the ExitPath stanza of the 'qm.ini' file or the ClientExitPath stanza of the 'mqs.ini' file and can be changed if required. Exits on the server use the 'qm.ini' file, those on the client use the 'mqs.ini' file. Alternatively you can specify the full path name in the MQCD if MQCONNX is used or in the DEFINE CHANNEL command.
Define a dummy MQStart() routine in the exit and specify MQStart as the entry point in the module. Figure 86 shows how to set up an entry to your program:
#include <cmqc.h> #include <cmqxc.h> void MQStart() {;} /* dummy entry point - for consistency only */ void MQENTRY ChannelExit ( PMQVOID pChannelExitParms, PMQVOID pChannelDefinition, PMQLONG pDataLength, PMQLONG pAgentBufferLength, PMQVOID pAgentBuffer, PMQLONG pExitBufferLength, PMQPTR pExitBufferAddr) { ... Insert code here }
Figure 87 shows the compiler and linker commands for channel-exit programs on AIX(R).
$ xlc_r -q64 -e MQStart -bE:exit.exp -bM:SRE -o /var/mqm/exits64/exit exit.c -I/usr/mqm/inc -L/usr/mqm/lib64 -lmqm_r
Figure 88 shows a sample export file for this make file.
#! channelExit MQStart
On the client, a 32-bit or 64-bit exit can be used. This must be linked to mqic_r.
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
csqzae10302 |