List variables contain an ordered collection of Production Reporting variables and are nonrecursive (you cannot nest lists within lists).
Indicate list variables with the % symbol. Create list variables with the LET command along with a list of variables. For example,
LET %LIST1 = LIST (num_var1|str_var1, num_var2|str_var2,...)
You can perform the following actions with list variables:
let %listname=LIST(col_var|num_var|str_var|str_lit|num_lit[,...])
let %listname[num_lit]=list(NUMBER|DATE|TEXT$colname |'.colname'[,...])
let %listname|%listname[num_var|num_lit]=list(col_var|str_var |num_var|str_lit|num_lit[,…])
let str_var|num_var=%listname[num_var|num_lit].#colname
In list-variable arguments, the value between the brackets indicates either the number of rows in the list for the definition case or the row within the list to be modified or assigned.
If no brackets exist, there is no need to predefine; assign the types based on the given variable types. For multirow lists, the assignment must be compatible with the types given in the definition.
A NUMBER field has the same characteristics as an undeclared #var; the underlying storage depends on the contents, and the DEFAULT-NUMERIC setting applies.
The usual Production Reporting rules for variable assignment apply to list access. Assignment is prohibited only between Date and Numeric types. Assignment of a numeric column to a string variable returns the string representation of the numeric value; assignment of a date variable to a string variable returns the default-edit-mask representation of the date.