Hello,
I am trying to send a message to a user when they call a program and it encounters an issue.
In CLLE, if I do SNDPGMMSG, leave all values as they are and put some text in;
I get a white message popup at the bottom of my session;
However; I can't get this to do the same within an RPGLE program with a call to QMHSNDPM - the message appears in my job log, but not at the bottom of the screen;
I have tried the following message types; *INFO, *DIAG, *NOTIFY and also calls with a MSGID of CPF9897 and a message file of 'CPF9897': 'QCPFMSG *LIBL' - no luck
Is it something to do with the fact the error message is generated in QMHSNDPM so when it returns to my program, the message is lost? Or is it something else? Is there a way to do it (write a CL and do it that way?)? What is the meaning of life?
Cheers,
Ryan
I am trying to send a message to a user when they call a program and it encounters an issue.
In CLLE, if I do SNDPGMMSG, leave all values as they are and put some text in;
Code:
PGM SNDPGMMSG MSG('CODE400 is the best!') ENDPGM
Code:
Selection or command ===> F3=Exit F4=Prompt F9 F23=Set initial menu [U][B]CODE400 is the best! [/B][/U]
Code:
* Send error message D QMHSNDPM Pr ExtPgm('QMHSNDPM') D #MsgID 7a Const D #MsgFile 20a Const D #MsgDta 32767a Const Options(*VarSize) D #MsgDtaLen 10i 0 Const D #MsgType 10a Const D #StackEntry 10a Const D #StackCount 10i 0 Const D #MsgKey 4a D ErrorCode 32767a Options(*VarSize) D ErrorCode DS D #BytesProv 10i 0 Inz(0) D #BytesAvail 10i 0 Inz(0) * Work fields D #MsgKey S 4a D #MSG C Const('CODE400 is the best!') * Main line code QMHSNDPM(' ':' ':#MSG :%Len(%Trim(#MSG)) :'*INFO':'*':0:#MsgKey: ErrorCode); *Inlr = *On; Return;
Is it something to do with the fact the error message is generated in QMHSNDPM so when it returns to my program, the message is lost? Or is it something else? Is there a way to do it (write a CL and do it that way?)? What is the meaning of life?
Cheers,
Ryan
Comment