What made you think you can use AS/400 CL for a msgexit? The Intercommunication manual is very specific:
The exit is a program object written in the C/400(R), Integrated Language Environment(R) (ILE) COBOL/400(R) or ILE RPG/400(R) language. The exit program names and their libraries are named in the channel definition. Observe the following conditions when creating and compiling an exit program: The program must be made thread safe and created with the C/400, ILE RPG/400, or ILE COBOL/400 compiler. For ILE RPG you must specify the THREAD(*SERIALIZE) control specification, and for ILE COBOL you must specify SERIALIZE for the THREAD option of the PROCESS statement. The programs must also be bound to the threaded WebSphere MQ libraries: QMQM/LIBMQM_R in the case of C/400 and ILE RPG/400, and AMQ0STUB_R in the case of ILE COBOL/400. For additional information about making RPG or COBOL applications thread safe, refer to the appropriate Programmer's Guide for the language. WebSphere MQ for iSeries requires that the exit programs are enabled for teraspace support. (Teraspace is a form of shared memory introduced in OS/400 V4R4.) In the case of the ILE RPG and COBOL compilers, any programs compiled on OS/400 V4R4 or later are so enabled. In the case of C, the programs must be compiled with the TERASPACE(*YES *TSIFC) options specified on CRTCMOD or CRTBNDC commands. An exit returning a pointer to its own buffer space must ensure that the object pointed to exists beyond the timespan of the channel-exit program. In other words, the pointer cannot be the address of a variable on the program stack, nor of a variable in the program heap. Instead, the pointer must be obtained from the system. An example of this is a user space created in the user exit. To ensure that any data area allocated by the channel-exit program is still available for the MCA when the program ends, the channel exit must run in the caller's activation group or a named activation group. Do this by setting the ACTGRP parameter on CRTPGM to a user-defined value or *CALLER. If the program is created in this way, the channel-exit program can allocate dynamic memory and pass a pointer to this memory back to the MCA. -----Original Message----- From: MQSeries List [mailto:[EMAIL PROTECTED] Behalf Of Shuba P.K. Sent: 24 June 2004 13:06 To: [EMAIL PROTECTED] Subject: MQSeries Channel Exits on AS400 Hi All, Requirement: I have a setup that has one RemoteQueue Definition, Transmission Queue, Sender, Reciever channel pair. When the message moves across a channel, I want this Message Channel Exit program to get activated and do the processing. In the current setup my original message goes to the destined queue on the other Queue Manager using Channels. This one can be accomplished in Windows and in AIX by using a dll(functionname) in the message exit parameter of the channel defination. As one of the MQ series manual for AS/400, it says we have to put the Library/Programname. Problem we are facing: 1. We created a simple CL program as PGM SNDBRKMSG MSG('It is working') TOMSGQ(JAGANNATH) ENDPGM We added this program name in the MSGEXIT parameter of the CRTMQMCHL command. But when we are sending a message to this Q Manager from our Q Manager on NT then this program is not executed (We confirmed this because we could not see any Break message). 2. We have the C codes which we had developed for the NT environment. Now we put the same code in AS/400 and created a service program out of that. But we dont know what all parameters it should get. Can any of you please help on this? Regards, Shuba. "{--?~ jvx2 j)b b.n +bvz'^v) ? ??Kn?i^jm? 0[(~ ?`+r{m jH ' j A' j! Instructions for managing your mailing list subscription are provided in the Listserv General Users Guide available at http://www.lsoft.com Archive: http://vm.akh-wien.ac.at/MQSeries.archive