Paul, I've never done this with C (and don't know anything about C), but I have done similar functions with RPGLE.
When you create your C programs with CRTPGM, be sure to specify *CALLER for the Activation Group. This will maintain the MQ handles between invocations because all the programs will run in the same activation group. Also, when I do this with RPGLE, I make sure that the "utility" programs end with a "return" as opposed to a hard end. This keeps everything open. I guess there is an analogous method in C. Lynn -----Original Message----- From: MQSeries List [mailto:[EMAIL PROTECTED] Behalf Of Paul Meekin Sent: Thursday, June 19, 2003 5:58 AM To: [EMAIL PROTECTED] Subject: RPG/400, C and MQ Hi all, I know almost nothing about RPG but have to find out the feasability of something. Can an RPG/400 program call an ILE C program to do the MQ Conn and Open, and then call another C program to do the MQPuts? I.e. something like the following: RPG/400 Program | V Call ILE C program to Connect to QMgr, Open Queue etc | V Back to main RPG program | V Call ILE C program to Put messages to a queue | V Back to main RPG program | etc My main concern is whether the Connection and Object handles will remain valid across multpile invocations of the C program. Of course a small sample of code would be beyond my wildest dreams ;-) Cheers, Paul **************************************************************************** **************************** This e-mail is from Energis Communications Ltd, 185 Park Street, London, SE1 9DY, United Kingdom, No: 2630471. This e-mail is confidential to the addressee and may be privileged. The views expressed are personal and do not necessarily reflect those of Energis. If you are not the intended recipient please notify the sender immediately by calling our switchboard on +44 (0) 20 7206 5555 and do not disclose to another person or use, copy or forward all or any of it in any form. **************************************************************************** **************************** 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 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