Ü
MSGCON
·
This keyword is used at field
level to specify that any message can be displayed as a constant on the display
screen.
·
The format of the keyword is:
MSGCON
(length message-ID
library-name/message-file-name)
Example
Columns . . . : 1 80 Browse AMITCCCCC/QRPGLESRC
SEU==> ACC_DSPCCC
FMT DP .....AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions+++++++++++++++++++++++++++
*************** Beginning of data ***********************************************
0001.00 A DSPSIZ(24 80 *DS3)
0002.00 A CA03(03 'EXIT')
0003.00 A CA12(12 'PREVIOUS')
0004.00 A R HEADER
0005.00 A 1 30'ACCOUNT ENTRY DISPLAY'
0006.00 A DSPATR(HI)
0007.00 A COLOR(BLU)
0008.00 A 4 25'ORG'
0009.00 A DSPATR(HI)
0010.00 A COLOR(BLU)
0011.00 A S_ORG 3S 0B 4 35
0012.00 A FLDCSRPRG(S_ACC)
0013.00 A 50 DSPATR(RI)
0014.00 A 4 55MSGCON(20 MSG1111 AMIT/AM_MSGF)
0015.00 A 5 25'ACC'
0016.00 A DSPATR(HI)
0017.00 A COLOR(BLU)
0018.00 A S_ACC 12A B 5 35
0019.00 A FLDCSRPRG(S_CCY)
0020.00 A 51 DSPATR(RI)
0021.00 A 5 55MSGCON(20 MSG1112 AMIT/AM_MSGF)
0022.00 A 6 25'CCY'
0023.00 A DSPATR(HI)
0024.00 A COLOR(BLU)
0025.00 A S_CCY 3A B 6 35
0026.00 A FLDCSRPRG(S_PARTY)
0027.00 A 52 DSPATR(RI)
0028.00 A 6 55MSGCON(20 MSG1113 AMIT/AM_MSGF)
0029.00 A 7 25'PARTY'
0030.00 A DSPATR(HI)
0031.00 A COLOR(BLU)
0032.00 A S_PARTY 12A B 7 35
0033.00 A 53 DSPATR(RI)
0034.00 A 7 55MSGCON(20 MSG1114 AMIT/AM_MSGF)
0035.00 A R FOOTER
0036.00 A OVERLAY
0037.00 A 22 5'F3 = EXIT'
0038.00 A DSPATR(HI)
0039.00 A COLOR(BLU)
0040.00 A 22 20'F12 = CANCEL'
0041.00 A DSPATR(HI)
0042.00 A COLOR(BLU)
0043.00 A S_MSG 30A O 23 2
****************** End of data ****************************************************
Columns . . . : 1 80 Browse AMITCCCCC/QRPGLESRC
SEU==> ACC_RPGCCC
FMT H .....HKeywords++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
*************** Beginning of data *****************************************************
0001.00 HOPTION(*NODEBUGIO)
0002.00 H DEBUG(*YES)
0003.00 FACC_DSPCCCCF E WORKSTN
0004.00 FACCOUNT UF A E K DISK
0005.00 DDATA S 30A
0006.00 DERR S 30A DIM(4)
0007.00 D CTDATA
0008.00 D PERRCD(1)
0009.00 DINFO S 30A DIM(1)
0010.00 D CTDATA
0011.00 D PERRCD(1)
0012.00 Dtime_is S z
0013.00 Dtime_isO S 20
0014.00 DCMD S 25
0015.00 *
0016.00 DCURTIMSTP DS
0017.00 DCURTIMDATE 1 16S 0
0018.00 DCURRYEAR 1 4S 0
0019.00 DCURRMONTH 5 6S 0
0020.00 DCURRDAY 7 8S 0
0021.00 DCURRHRS 9 10S 0
0022.00 DCURRMINS 11 12S 0
0023.00 DCURRSECS 13 16S 0
0024.00 *
0025.00 C SETOFF 505152
0026.00 C SETOFF 53
0027.00 C MOVEL *BLANKS S_MSG
0028.00 C* EVAL CMD='SNDPGMMSG MSGDTA("HI")+
0029.00 C* PGMQ(ACC_RPGLE)+
0030.00 C* MSGF(ACPFMSG)+
0031.00 C*
0032.00 C* MOVEL 25 LEN 2 0
0033.00 C* CALL 'QCMDEXC'
0034.00 C* PARM CMD
0035.00 C* PARM LEN
0036.00 C DOW *IN03=*OFF
0037.00 C 03 LEAVE
0038.00 C WRITE HEADER
0039.00 C WRITE FOOTER
0040.00 C READ HEADER
0041.00 C SETOFF 505152
0042.00 C SETOFF 53
0043.00 C EVAL S_MSG=*BLANKS
0044.00 C IF S_ORG=*ZEROS
0045.00 C SETON 50
0046.00 C MOVEL ERR(1) DATA
0047.00 C ELSEIF S_ACC=*BLANKS
0048.00 C SETON 51
0049.00 C MOVEL ERR(2) DATA
0050.00 C ELSEIF S_CCY=*BLANKS
0051.00 C SETON 52
0052.00 C MOVEL ERR(3) DATA
0053.00 C ELSEIF S_PARTY=*BLANKS
0054.00 C SETON 53
0055.00 C MOVEL ERR(4) DATA
0056.00 C ELSE
0057.00 C MOVEL *BLANKS DATA
0058.00 C SETOFF 505152
0059.00 C SETOFF 53
0060.00 C ENDIF
0061.00 C MOVEL DATA S_MSG
0062.00 * JUST CHECK IF THE S_MSG IS BLANK OR NOT..
0063.00 C IF S_MSG=*BLANKS
0064.00 C EVAL ORG=S_ORG
0065.00 C EVAL ACC=S_ACC
0066.00 C EVAL CCY=S_CCY
0067.00 C EVAL PARTY=S_PARTY
0068.00 C EVAL ACCSTS=2
0069.00 C EVAL ENTSTS=1
0070.00 C EVAL VERSTS=1
0071.00 C EVAL AUTSTS=1
0072.00 C EVAL RECSTS=2
0073.00 * CALCULATE THE TIME FOR THE CURRENT SYSTEM DATE
0074.00 C EVAL TIMESTP=%TIMESTAMP()
0075.00 C EVAL TIME_IS=%TIMESTAMP()
0076.00 C EVAL TIME_ISO=%char(TIME_IS:*iso0)
0077.00 C EVAL CURRYEAR=%dec(%SUBST(TIMe_ISo:1:4):4:0)
0078.00 C EVAL CURRMONTH=%dec(%SUBST(TIMe_ISo:5:2):2:0)
0079.00 C EVAL CURRDAY=%dec(%SUBST(TIMe_ISo:7:2):2:0)
0080.00 C EVAL CURRHRS=%dec(%SUBST(TIMe_ISo:9:2):2:0)
0081.00 C EVAL CURRMINS=%dec(%SUBST(TIMe_ISo:11:2):2:0)
0082.00 C EVAL CURRSECS=%dec(%SUBST(TIMe_ISo:13:4):4:0)
0086.00 C WRITE REC1
0087.00 C MOVEL INFO(1) S_MSG
0088.00 C EVAL S_ORG =*ZEROS
0089.00 C EVAL S_ACC=*BLANKS
0090.00 C EVAL S_CCY=*BLANKS
0091.00 C EVAL S_PARTY=*BLANKS
0092.00 C ENDIF
0093.00 C ENDDO
0094.00 C SETON LR
0095.00 ** ERR CTDATA
0096.00 ORG CODE CAN NOT BE BLANK.
0097.00 ACC NUMBER CAN NOT BE BLANK.
0098.00 CURRENCY CAN NOT BE BLANK.
0099.00 PARTY NUMBER CANNOT BE BLANK.
0100.00 ** INFO CTDATA
0101.00 THE RECORD HAS BEEN UPDATED.
****************** End of data ***********************************************************
OUTPUT
ACCOUNT ENTRY DISPLAY
ORG ENTER ORG CODE
ACC ENTER ACCOUNT
CCY ENTER CURRENCY
PARTY ENTER PARTY NO.
F3 = EXIT F12 = CANCEL