|
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.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.