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} ... ]

  1 - table-size

  is an integer that specifies the exact number of occurrences of a
  table element.

  2 - key-name

  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.

  3 - ind-name

  is an index-name. It associates an index with the table and allows
  indexing in table element references.
  Close     Help