VMS Help
COBOL, DATA_DIVISION, clauses, OCCURS, 1format_table-size
*Conan The Librarian
|
The OCCURS clause defines tables and provides the basis for
subscripting and indexing. It eliminates the need for separate
entries for repeated data items.
Format 1 -
OCCURS table-size TIMES
[ { ASCENDING } KEY IS {key-name} ... ] ...
[ { DESCENDING } ]
[ INDEXED BY {ind-name} ... ]
is an integer that specifies the exact number of occurrences of a
table element.
is the data-name of an entry that contains the OCCURS clause or an
entry subordinate to it. Key-name can be qualified. Each key-name
after the first must name an entry subordinate to the entry that
contains the OCCURS clause. The values in each key-name are the
basis of the ascending or descending arrangement of the table's
repeated data.
is an index-name. It associates an index with the table and allows
indexing in table element references.