EDPX RDML

FUNCTION OPTIONS(*DIRECT *WEBEVENT)
GROUP_BY NAME(#PRMTBLGRP) FIELDS(#MPRMCTG #MPRMCOD #MPRMDSC)
DEF_LIST NAME(#ARRAY_LST) FIELDS(#Z_DATA) COUNTER(#Z_COUNT) TYPE(*WORKING) ENTRYS(500)
DEF_LIST NAME(#X1BL01LST) FIELDS(#X1ALPLONG) ENTRYS(1000)

DEFINE FIELD(#ZZCOUNT) TYPE(*DEC) LENGTH(2) DECIMALS(2)
DEFINE FIELD(#ZZCOUNTC) TYPE(*CHAR) LENGTH(2)

DEFINE FIELD(#ZFNAMEMMM) TYPE(*CHAR) LENGTH(25)
DEFINE FIELD(#ZLNAMEMMM) TYPE(*CHAR) LENGTH(25)
DEFINE FIELD(#ZSSNUMMMM) TYPE(*CHAR) LENGTH(25)

* =======================================================
* Moving Respective HTML Pages to Components
* =======================================================

CHANGE FIELD(#DCTONLCMP) TO(*NULL)
CHANGE FIELD(#DCTHEDCMP) TO(PAG_RPARRHED)
CHANGE FIELD(#DCTHDRCMP) TO(*NULL)
CHANGE FIELD(#DCTLFTCMP) TO(*NULL)
CHANGE FIELD(#DCTPAGCMP) TO(PAG_RPARRAY)
* =======================================================
* Process according to Button clicked
* =======================================================

CASE OF_FIELD(#STDRENTRY)
WHEN VALUE_IS(‘*EQ N’)
* do logic here to validate if you want to
REQUEST FIELDS(#ZFNAMEMMM #ZLNAMEMMM) EXIT_KEY(*NO) MENU_KEY(*NO)
WHEN VALUE_IS(‘*EQ *BLANKS’)
CHANGE FIELD(#MPRMCTG) TO(PENDC)
CHANGE FIELD(#MPRMCOD) TO(”’RPARRAY1”’)
CLR_LIST NAMED(#ARRAY_LST)
CLR_LIST NAMED(#X1BL01LST)

SELECT FIELDS(#PRMTBLGRP) FROM_FILE(M@PRMTBL) WITH_KEY(#MPRMCTG #MPRMCOD) GENERIC(*YES)
EXECUTE SUBROUTINE(LISTENTRY) WITH_PARMS(#MPRMDSC)
ENDSELECT

* Build List for Javascript Array
CHANGE FIELD(#ZZCOUNT) TO(0)
SELECTLIST NAMED(#ARRAY_LST)
CHANGE FIELD(#X1ALPLONG) TO(#Z_DATA)
ADD_ENTRY TO_LIST(#X1BL01LST)
ENDSELECT
OTHERWISE
MESSAGE MSGTXT(‘STDRENTRY not Programmed for’)
ENDCASE

REQUEST FIELDS((#STDNEXT *HIDE) (#STDRENTRY *HIDE)) EXIT_KEY(*NO) MENU_KEY(*NO) PROMPT_KEY(*NO)
REQUEST BROWSELIST(#X1BL01LST) EXIT_KEY(*NO) MENU_KEY(*NO)

* =======================================================
* Subroutine ….: LISTENTRY
* Description….: Add Entries to List
* =======================================================
SUBROUTINE NAME(LISTENTRY) PARMS(#Z_DATA)
IF_NULL FIELD(#Z_DATA)
ELSE
ADD_ENTRY TO_LIST(#ARRAY_LST)
ENDIF
ENDROUTINE