Add optional stack count parm to SndEscMsg

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