The exit is a DLL that must be written in C.
If the exit is on a Windows(R) client, specify the path name on the All Queue Managers page of the WebSphere MQ properties (accessed from the WebSphere MQ services snap-in).
The WebSphere MQ Services snap-in is described in the WebSphere MQ System Administration Guide manual.
The default exit path is c:\Program Files\IBM\Websphere MQ\exits. The actual location is set by the following registry setting:
HKEY_LOCAL_MACHINE\SOFTWARE\IBM\MQSeries\CurrentVersion\Configuration\ ClientExitPath\ExitsDefaultPath
You can override this value by specifying a full path name on the DEFINE CHANNEL command.
Define a dummy MQStart() routine in the exit and specify MQStart as the entry point in the library. Figure 84 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 ( PMQCXP pChannelExitParms, PMQCD pChannelDefinition, PMQLONG pDataLength, PMQLONG pAgentBufferLength, PMQVOID pAgentBuffer, PMQLONG pExitBufferLength, PMQPTR pExitBufferAddr) { ... Insert code here }
In order to access the fields pointed to by pChannelExitParms and pChannelDefinition you need to insert the following lines in your exit program:
·
·
·
/* Variable definitions */
·
·
·
PMQCXP pParms; PMQCD pChDef;
·
·
·
/* Code */
·
·
·
pParms = (PMQCXP)pChannelExitParms; pChDef = (PMQCD)pChannelDefinition;
The pointers pParms and pChDef can then be dereferenced to access individual fields.
When writing channel exits for these products using Visual C++, you should do the following:
LIBRARY exit PROTMODE DESCRIPTION 'Provides Retry and Channel exits' CODE SHARED LOADONCALL DATA NONSHARED MULTIPLE HEAPSIZE 4096 STACKSIZE 8192 EXPORTS Retry
Notices |
Downloads |
Library |
Support |
Feedback
![]() ![]() |
csqzae10301 |