Hi
I cannot figure out how I can send a simple user warning (not error) message from a RPGLE to the bottom of the iSeries session.
I came across SNDPRGMSG which seems to be only used in CL.
I also came across the following method as well but all I need is to send a message saying, "Hey, by the way A equals B" back to the session. Is the following the best/shortest way to do it?
I cannot figure out how I can send a simple user warning (not error) message from a RPGLE to the bottom of the iSeries session.
I came across SNDPRGMSG which seems to be only used in CL.
I also came across the following method as well but all I need is to send a message saying, "Hey, by the way A equals B" back to the session. Is the following the best/shortest way to do it?
Code:
D SendEscMsg pr extpgm('QMHSNDPM')
D MsgID 7 const
D MsgFile 20 const
D MsgDta 80 const
D MsgDtaLen 10i 0 const
D MsgType 10 const
D MsgQ 10 const
D MsgQNbr 10i 0 const
D MsgKey 4
D ErrorDS 16
D ErrorDS ds 16
D BytesProv 10i 0 inz(16)
D BytesAvail 10i 0
D ExceptionID 7
D MsgDta s 80
D MsgKey s 4
C eval MsgDta = '[B]Something went wrong[/B]'
C callp SendEscMsg ('CPF9898':
C 'QCPFMSG QSYS':
C MsgDta:
C %len(MsgDta):
C '*ESCAPE':
C '*':
C 2:
C MsgKey:
C ErrorDS)





Comment