Example 1: Define, initialize and accept input into a list from the workstation. Process and validate the input, then update the database:
DEF_LIST NAME(#ORDERLINE) FIELDS(#ORDLIN #PRODUCT #QUANTITY #PRICE)
SET_MODE TO(*ADD)
CHANGE FIELD(#ORDERLINE) TO(*NULL)
INZ_LIST NAMED(#ORDERLINE) NUM_ENTRYS(10)
DISPLAY BROWSELIST(#ORDERLINE)
BEGINCHECK
SELECTLIST NAMED(#ORDERLINE) GET_ENTRYS(*NOTNULL)
* VALUECHECK --
* CONDCHECK | Various validation checks
* RANGECHECK | performed against each list entry
* FILECHECK --
UPD_ENTRY IN_LIST(#ORDERLINE)
ENDSELECT
ENDCHECK IF_ERROR(*LASTDIS)
SELECTLIST NAMED(#ORDERLINE) GET_ENTRYS(*ALL)
INSERT FIELDS(#ORDERLINE) TO_FILE(ORDLIN)
ENDSELECT