Ü
ERRMSGID
·
This keyword is used to associate
an error message with the field on display.
Example
Below is the message ID that we
will be using in our program.
Display Formatted Message Text
System: PUB1
Message ID . . . . . . . . . : ID00001
Message file . . . . . . . . : MSGF001
Library . . . . . . . . . : IROBO1
Message . . . . : THE FIELD CAN NOT BE BLANK
Bottom
Press Enter to continue.
F3=Exit F11=Display unformatted message text F12=Cancel
Columns . . . : 1 100 Edit IROBO1/QRPGLESRC
SEU==> DSP1
FMT DP .....AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions++++++++++++++++++++++
*************** Beginning of data *****************************************
0000.30 A DSPSIZ(24 80 *DS3)
0000.40 A CA03(03 'EXIT')
0000.50 A R DETAIL
0000.70 A FLD1 10Y 3B 3 12COLOR(RED)
0000.80 A 10 ERRMSGID(ID00001 IROBO1/MSGF001)
0000.90 A 3 2'FIELD-1: '
****************** End of data ********************************************
Columns . . . : 6 100 Browse IROBO1/QRPGLESRC
SEU==> EXFMT_PGM
FMT FX FFilename++IPEASF.....L.....A.Device+.Keywords++++++++++++++Comments++++++++++++
*************** Beginning of data **********************************************
0001.00 FDSP1 CF E WORKSTN
0002.00 C eval fld1=1122334.455
0003.00 C dow *in03=*off
0004.00 C 03 leave
0005.00 C if fld1=*zeros
0006.00 C seton 10
0007.00 C else
0008.00 C setoff 10
0009.00 C endif
0010.00 C write Detail
0011.00 C read Detail
0012.00 C enddo
0013.00 C seton lr
****************** End of data *************************************************
OUTPUT
We just
press ENTER KEY without entering anything in the field to get the error message
as shown below.
FIELD-1: ______________
THE FIELD CAN NOT BE BLANK >>>>>>> Error message