| Note: Usage options |
The DEF_LIST command is used to define a list and the fields that comprise an entry in the list.
The list may be a browse list (used for displaying information at a workstation) or a working list (used to store information within a program).
Lists are categorized into static and dynamic lists. A static list is a list that does not specify *MAX in the ENTRYS parameter. If it does it is a dynamic list. Dynamic lists can only be used in RDMLX objects and are recommended as memory requirements are much lower.
For instance the command:
DEF_LIST NAME(#ORDERLINE) FIELDS(#ORDLIN #PRODUCT #QUANTITY #PRICE)
defines a browse list that can be displayed at a workstation and might look like this:
Order Line Product Number Quantity Net Number Ordered Price 999 XXXXXXXXX 99999 9999.99 999 XXXXXXXXX 99999 9999.99 999 XXXXXXXXX 99999 9999.99 999 XXXXXXXXX 99999 9999.99 999 XXXXXXXXX 99999 9999.99 999 XXXXXXXXX 99999 9999.99 |
While the command:
DEF_LIST NAME(#ORDERLINE) FIELDS(#ORDLIN #PRODUCT #QUANTITY #PRICE) TYPE(*WORKING) ENTRYS(10)
defines a working list that can contain at most 10 entries. This type of list cannot be directly displayed at the workstation but can be accessed within the RDML program just like a browse list.
When the DEF_LIST command is used it defines what fields are in one "entry" of the list. The browse list example above has 6 entries shown and each entry contains an order line number, a product number, a quantity and a price.
Once defined, there are limits to the number of entries in each type of list.
An RDML browse list can contain up to the number of entries as shown in the following table:
Operating Systems | RDML | RDMLX List without RDMLX field | RDMLX List with RDMLX field |
|---|---|---|---|
All (Non Web functions) | 9999 | 9999 | 9999 |
IBM i (Web functions) | 9999999 | 9999 | 9999999 |
Others (Web functions) | 9999 | 9999 | 9999999 |
Continued in 7.26.2 DEF_LIST Description
Portability Considerations | Refer to parameter: SCROLL_TXT. |
7.26.2 DEF_LIST Description continued
7.26.3 DEF_LIST Comments / Warnings
Required --------------------------------------------------------------------------- >-- COUNTER --------- *NONE ---------------------------> >-- TYPE -------------- *BROWSE --------------------------> >-- ENTRYS ------------- 50 --------------------------------> >-- PAGE_SIZE ---------- *NONE ----------------------------> >-- TOP_ENTRY --------- *CURRENT -------------------------> >-- SEL_ENTRY ---------- *NONE ----------------------------> >-- SCROLL_TXT --------- *NONE -----------------------------| |