FORMLIST Statement
Creates a select list from a dynamic array. The resulting list can be read sequentially with the READNEXT statement and can be used in the PASSLIST clause of PERFORM.
This function is provided for compatibility with mvEnterprise and is only available in MVENTERPRISE mode (set with the $OPTIONS statement).
Syntax
FORMLIST dyn-array {TO [listNumber || listVar]} {SETTING setting-var}
Syntax Elements
dyn-array The name of a dynamic array from which the list is developed. If a dynamic array is specified rather than a file variable, each attribute, value and subvalue in the array becomes an item-id in a list variable.
listNumber Must be 0. Specifies the active select list.
listVar The name of a variable to which the list will be assigned.
Note
If the TO clause is omitted the file is selected to the internal default select variable.
setting-var The name of a variable to which a code is assigned if an error occurs. In all other cases it is assigned the number of items in the list created.
Example
X = 'B':AM:'C':AM:'D':AM:'E1':VM:'E2':VM:'E3'
ATTR4 = X<4>
FORMLIST ATTR4 TO VMLIST
READNEXT ID FROM VMLIST THEN
READ ITEM FROM CUSTF,ID ELSE ITEM=''
END ELSE ITEM=''
Assigns the list E1, E2, E3 to VMLIST. Assigns the string E1 to ID.
See Also
SELECT statement.