|
Leif, If SAY uses SNDPGMMSG MSG(&TEXT) TOPGMQ(*PREV) then all it will do is send the message to the program that called it ie the one that you show in your code segment, lets call it PGMA If this is running from a menu commandline and you want the message to display at that command line then you'll need to capture the messages sent tp PGMA and send them to TOPMGQ(*PREV) which is that commandline interface. The code below generally works a treat. RCVMSG MSGQ(*PGMQ) RMV(*NO) MSGDTA(&MSGDTA) + MSGDTALEN(&MSGDTALEN) MSGID(&MSGID) + MSGF(&MSGF) MSGFLIB(&MSGFLIB) SNDPGMMSG MSGID(&MSGID) MSGF(&MSGFLIB/&MSGF) + MSGDTA(&MSGDTA) TOPGMQ(*PRV) Insert this after CALL SAY(&RETURN) I usually declare the various parameters as DCL VAR(&MSGID) TYPE(*CHAR) LEN(7) DCL VAR(&MSGF) TYPE(*CHAR) LEN(10) DCL VAR(&MSGFLIB) TYPE(*CHAR) LEN(10) DCL VAR(&MSGDTA) TYPE(*CHAR) LEN(80) DCL VAR(&MSGDTALEN) TYPE(*DEC) LEN(5 0) VALUE(80) Graham Smith ****************************** Tel - 0208 848 2585 ****************************** > ---------- > From: Leif Svalgaard[SMTP:leif@leif.org] > Sent: 06 July 2001 23:22 > To: List Midrange > Subject: CL problem > > It has been a while, but why doesn't this work? (it always returns a > message > of blanks) > > PGM > DCL VAR(&RETURN) TYPE(*CHAR) LEN(10) > CALL MYPROG RESULT(&RETURN) > CALL SAY PARM(&RETURN) > ENDPGM > > MYPROG stuffs something in its parameter > SAY send a message with text given by its parameter > > > > +--- > | This is the Midrange System Mailing List! > | To submit a new message, send your mail to MIDRANGE-L@midrange.com. > | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. > | To unsubscribe from this list send email to > MIDRANGE-L-UNSUB@midrange.com. > | Questions should be directed to the list owner/operator: > david@midrange.com > +--- > ********************************************************************** This email and any attachments are confidential and solely for the use of the intended recipient. They may contain material protected by legal professional or other privilege. If you are not the intended recipient or the person responsible for delivering to the intended recipient, you are not authorised to and must not disclose, copy, distribute or retain this email or its attachments. Although this email and its attachments are believed to be free of any virus or other defect, it is the responsibility of the recipient to ensure that they are virus free and no responsibility is accepted by the company for any loss or damage arising from receipt or use thereof. ********************************************************************** +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
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.