7.80.3 INZ_LIST Examples
Example 1: Initialize a list named #ORDERLINE with 100 "null" entries that are to be used for data entry (input capable on the display):
DEF_LIST NAME(#ORDERLINE) FIELDS(#ORDLIN #PRODUCT #QUANTITY)
CHANGE FIELD(#ORDERLINE) TO(*NULL)
SET_MODE TO(*ADD)
INZ_LIST NAMED(#ORDERLINE) NUM_ENTRYS(100)
Example 2: Use the list created in example 1 to perform multiple line data entry for an order lines file:
DEF_LIST NAME(#ORDERLINE) FIELDS(#ORDLIN #PRODUCT #QUANTITY)
CHANGE FIELD(#ORDERLINE) TO(*NULL)
SET_MODE TO(*ADD)
INZ_LIST NAMED(#ORDERLINE) NUM_ENTRYS(100)
REQUEST FIELDS(#ORDNUM) BROWSELIST(#ORDERLINE)
SELECTLIST NAMED(#ORDERLINE) GET_ENTRYS(*NOTNULL)
INSERT FIELDS(#ORDERLINE) TO_FILE(ORDLIN)
ENDSELECT