Screen Arrays

In a form specification file (.per), a screen array must be declare to group form fields defining the columns of the TABLE container.

Each "row" of a screen array is a screen record. The screen array is used by the DISPLAY ARRAY instruction in the program code, to bind the program array rows with the TABLE container. You must declare screen arrays in the INSTRUCTIONS section:
 44 INSTRUCTIONS
 45 SCREEN RECORD sa_cust(customer.*);
 46 END
Note:
  • Line 45 defines a screen array (aka screen record, with the name sa_cust. In this example, we use a tabname.* notation to include all columns of the "customer" table. The fields must be listed inside parenthesis.
To use the column definitions of the "customer" table, the table must be declared in the TABLES section of the form, and we must declare the use of the database schema at the beginning of the form specification file:
 1 SCHEMA custdemo
 ...
 26 TABLES
 27 customer
 28 END
Note:
  • Line 1 declares the use of the custdemo schema.
  • Line 27 declares the use of the customer table definition in the schema specified in line 1.