|
Terry, Thanks for the help up to this point. I have to ask one more thing. When I use the CL example you sent me to send the completion message it does not work if the CL is called from a ILE C program (The CL works fine if called from another CL). I have noticed that the message is shown on the c terminal screen (I happened to print a debug message to the screen). The program does not typically write to stdout and I end it with exit(0) to prevent the c terminal from being shown. Could the exit(0) be part of the problem or do need to implement the CL eq. in ILE C (I would need help if the answer is yes) ? Thanks, Etienne -----Original Message----- From: c400-l-bounces@xxxxxxxxxxxx [mailto:c400-l-bounces@xxxxxxxxxxxx]On Behalf Of Terrence Enger Sent: Saturday, May 31, 2003 12:34 PM To: C programming iSeries / AS400 Subject: RE: [C400-L] SNDPGMMSG ILE C At 11:43 2003-05-31 -0400, Etienne Richards <etienner@xxxxxxxxxxx> wrote: >Terry, > >This might be a silly question but... Not at all. I just didn't want to make assumptions about what you already know. > >How do I send a completion message up the program stack? > Here are examples in CL. AA1722 is the basic way of doing it. Note in particular TOPGMQ(*PRV). AA1723 simply forwards a completion message from a called program. This is what you might do in a program which is a trivial wrapper around another program which does all the real work. ===== start AA1722 ===== pgm SNDPGMMSG MSGID(CPF9897) MSGF(QCPFMSG) MSGDTA('AA1722 + completed successfully') TOPGMQ(*PRV) + MSGTYPE(*COMP) endpgm ===== start AA1723 ===== pgm dcl &msgid *char 7 dcl &msgdta *char 2000 dcl &msgf *char 10 dcl &msgflib *char 10 CALL PGM(AA1722) RCVMSG MSGTYPE(*COMP) MSGDTA(&MSGDTA) MSGID(&MSGID) + MSGF(&MSGF) MSGFLIB(&MSGFLIB) SNDPGMMSG MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) + MSGDTA(&MSGDTA) TOPGMQ(*PRV) MSGTYPE(*COMP) endpgm ===== end source files ===== Let me know if you need help translating these techniques into C. HTH. Terry. _______________________________________________ This is the C programming iSeries / AS400 (C400-L) mailing list To post a message email: C400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/c400-l or email: C400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/c400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.