The OCCURS Clause in the Screen Section
The OCCURS clause eliminates the need for separate entries for
repeated screen items and supplies information required for the application of
subscripts or indices.
General Format

Syntax Rules
- The OCCURS clause is not allowed at 01 level.
- If USING or TO clauses apply to the item, or to any item
subsidiary to the item, then the same number of OCCURS clauses, specifying the
same number of occurrences, must apply to the receiving item. These OCCURS
clauses must not include the DEPENDING phrase.
- If a FROM clause applies to the item, or to any item subsidiary
to the item, either the same number of OCCURS clauses, specifying the same
number of occurrences, or no OCCURS clauses at all, must apply to the sending
item. These OCCURS clauses must not include the DEPENDING phrase.
General Rules
- In a screen description which is subject to an OCCURS clause, the
LINE and COLUMN clauses apply to each individual table entry. Thus either the
LINE or the COLUMN clause should specify relative positioning, because if they
both specify an absolute position every entry will appear in the same place.
- If the screen item is an output field, and no OCCURS clauses
apply to the sending item, in a DISPLAY operation the contents of the sending
item are moved to every occurrence of the screen item. An elementary item that
is fully subscripted is deemed to have no OCCURS clauses applying to it.
- If the screen item is an update field, or it is an output field
with OCCURS clauses applying to the sending item, then in a DISPLAY operation
the contents of each occurrence of the sending item are moved to the
corresponding occurrence of the screen item.
- If the screen item is an update or input field, then in an ACCEPT
operation the data entered into each occurrence of the screen item is moved to
the corresponding occurrence of the receiving item.