Ü
ERRMSG
·
This keyword is used to associate
an error message with the field on display.
Example
Columns . . . : 1 100 Edit IROBO1/QRPGLESRC
SEU==> DSP1
FMT DP .....AAN01N02N03T.Name++++++RLen++TDpBLinPosFunctions+++++++++++++ ...+... 9 ..
*************** Beginning of data *********************************************
0003.00 A DSPSIZ(24 80 *DS3)
0004.00 A CA03(03 'EXIT')
0005.00 A R DETAIL
0007.00 A FLD1 10Y 3B 3 12
0008.00 A COLOR(RED)
0009.00 A 10 ERRMSG('THE FIELD CAN NOT BE BLANK')
0010.00 A 3 2'FIELD-1: '
****************** End of data ************************************************
Columns . . . : 6 100 Edit 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
If we don’t enter anything into the field and just press ENTER, we
get the error shown below.
FIELD-1: ______________
THE FIELD CAN NOT BE BLANK >>>>>>> Error message