Add optional stack count parm to SndEscMsg
This commit is contained in:
parent
ec14ffcf3f
commit
fb9fb646ce
@ -14,6 +14,7 @@
|
||||
//============================================================
|
||||
D SndEscMsg pr Send ESC Msg
|
||||
D piMsg 512a Const Varying
|
||||
D pStackEnt 10i 0 Const options(*nopass)
|
||||
|
||||
//============================================================
|
||||
D SndInfMsg pr Send INF Msg
|
||||
|
||||
@ -189,13 +189,14 @@
|
||||
|
||||
D SndEscMsg PI
|
||||
D piMsg 512a Const Varying
|
||||
D piStackEnt 10i 0 Const options(*Nopass)
|
||||
|
||||
//--- Parameters for QMHSNDPM -------------------------
|
||||
D MsgId c const('CPF9898')
|
||||
d MsgF c const('QCPFMSG *LIBL ')
|
||||
d MsgType c const('*ESCAPE ')
|
||||
d PgmQue c const('* ')
|
||||
d InvCount c const(2)
|
||||
d InvCount s 10i 0 inz(2)
|
||||
d ApiError s 17a inz(X'00')
|
||||
d RetMsgKey s 4a
|
||||
D DataLen s 10i 0
|
||||
@ -208,6 +209,12 @@
|
||||
DataLen = %len(PiMSG);
|
||||
MsgData = piMsg;
|
||||
|
||||
if %parms = 2;
|
||||
InvCount = piStackEnt;
|
||||
else;
|
||||
InvCount = 2;
|
||||
endif;
|
||||
|
||||
QMHSNDPM(MsgId
|
||||
:MsgF
|
||||
:MsgData
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
A CF05
|
||||
A CF06
|
||||
A CF07
|
||||
A CF08
|
||||
A CA12
|
||||
A HELP
|
||||
A*===============================================================
|
||||
@ -30,10 +31,15 @@
|
||||
A 2 72TIME
|
||||
A 4 4'Message to send:'
|
||||
A SH_MSG 69 B 5 4
|
||||
A CHECK(LC)
|
||||
A 8 4'F4 - SndMsgPgmQ'
|
||||
A 9 4'F5 - ClrMsgPgmQ'
|
||||
A 10 4'F6 - SndInfMsg'
|
||||
A 11 4'F7 - SndEscMsg'
|
||||
A 11 30'Stack Count:'
|
||||
A SH_CNT 1Y 0B 11 43
|
||||
A 11 47'(0 means used default)'
|
||||
A 12 4'F8 - JobLogMsg'
|
||||
A 40 6 4'Please enter a message.'
|
||||
A DSPATR(RI)
|
||||
A*===============================================================
|
||||
@ -24,6 +24,7 @@
|
||||
D dfIndDS ds 99
|
||||
D SH_ERR 40 40n
|
||||
|
||||
|
||||
//=== Global Switches =========================================
|
||||
D SflMsgSnt s n
|
||||
D CowsComeHome c const('0')
|
||||
@ -41,6 +42,9 @@
|
||||
//=============================================================
|
||||
exsr init;
|
||||
SFT_KEYS='F3/F12=Exit';
|
||||
SH_Cnt = 2;
|
||||
SH_MSG = 'This is a fine pickle Ollie!';
|
||||
|
||||
dou CowsComeHome;
|
||||
write SH_HDR;
|
||||
write SFT_FKEY;
|
||||
@ -80,12 +84,22 @@
|
||||
|
||||
//--- F06 --------------------------------------------------
|
||||
when Key = F06;
|
||||
SndInfMsg(SH_MSG);
|
||||
|
||||
SndInfMsg(SH_MSG);
|
||||
iter;
|
||||
|
||||
//--- F07 --------------------------------------------------
|
||||
when Key = F07;
|
||||
SndEscMsg(SH_MSG);
|
||||
if SH_CNT = 0;
|
||||
SndEscMsg(SH_MSG);
|
||||
else;
|
||||
SndEscMsg(SH_MSG : SH_CNT);
|
||||
endif;
|
||||
iter;
|
||||
|
||||
//--- F08 --------------------------------------------------
|
||||
when Key = F08;
|
||||
JobLogMsg(SH_MSG);
|
||||
iter;
|
||||
|
||||
endsl;
|
||||
@ -137,7 +151,7 @@
|
||||
D retField S N
|
||||
D wkMsgId s 7a
|
||||
D wkMsgFile s 10a
|
||||
D wkMsgData s 80a varying
|
||||
D wkMsgData s 512a varying
|
||||
|
||||
/FREE
|
||||
if %parms >2;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user