D/COPY QSYSINC/QRPGLESRC,QUSEC D RcvVar S 256 D SrcVar S 30 D SrcVarCls S 10 inz('*ZONED') * D SrcVarPrc S 10i 0 D EdtCode S 1 D CurId S 1 D SrcDecPos S 10i 0 * D mh_msgid s 7 inz('CPF9898') D mh_msgfile s 20 inz('QCPFMSG *LIBL') D mh_msgdta s 512 inz('Message from RPG1') D mh_msgdtal s 9b 0 D mh_msgtype s 10 D mh_callste s 10 D mh_callstc s 9b 0 D mh_msgkey s 4 inz(*blanks) * C QMHSNDPM plist C parm mh_msgid C parm mh_msgfile C parm mh_msgdta C parm 512 mh_msgdtal C parm '*INFO' mh_msgtype C parm '*' mh_callste Message queue curren C parm 2 mh_callstc Message stack ppgm C parm mh_msgkey C parm QUSEC C EDTCODR plist C parm SrcVar C parm SrcVarCls C parm EdtCode C parm CurId C parm SrcVarPrc C parm SrcDecPos C parm RcvVar C Z-ADD 16 QUSBPRV C Z-add 123456789.012 tempn 12 3 C Movel tempn SrcVar C Eval Edtcode = '1' C Eval CurId = ' ' C Eval SrcVarPrc = 12 C Eval SrcDecPos = 3 C Exsr Edit C Eval Edtcode = '2' C Exsr Edit C Eval Edtcode = '3' C Exsr Edit C Eval Edtcode = '4' C Exsr Edit * show '$' in digits begin. C Eval Edtcode = '1' C Eval CurId = '$' C Exsr Edit C Eval Edtcode = '2' C Exsr Edit C Eval Edtcode = '3' C Exsr Edit C Eval Edtcode = '4' C Exsr Edit * * J,K,L,M show Negative value char '-' at End digits. C Z-add 123456789.012 tempn 12 3 C Eval tempn = tempn * (-1) C Movel tempn SrcVar C Eval Edtcode = 'J' C Eval CurId = ' ' C Exsr Edit C Eval Edtcode = 'K' C Exsr Edit C Eval Edtcode = 'L' C Exsr Edit C Eval Edtcode = 'M' C Exsr Edit * * N,O,P,Q show Negative value char '-' at Begin digits. C Eval Edtcode = 'N' C Exsr Edit C Eval Edtcode = 'O' C Exsr Edit C Eval Edtcode = 'P' C Exsr Edit C Eval Edtcode = 'Q' C Exsr Edit * * A,B,C,D show Negative value char 'CR' at End digits. C Eval Edtcode = 'A' C Exsr Edit C Eval Edtcode = 'B' C Exsr Edit C Eval Edtcode = 'C' C Exsr Edit C Eval Edtcode = 'D' C Exsr Edit C Move '1' *InLr *===================================================================== C Edit BegSr C Eval RcvVar = *Blanks C call 'EDTCODR' EDTCODR C Eval mh_msgdta = 'Edit Code:' + Edtcode + C ' ;CurId:' +CurId +' Rlt:'+ %trim(RcvVar) C call 'QMHSNDPM' QMHSNDPM C EndSr