Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


OCCURS clause

The data division clauses used for table handling are the OCCURS clause and the USAGE IS INDEX clause. For the USAGE IS INDEX description, see USAGE clause.

The OCCURS clause specifies tables whose elements can be referred to by indexing or subscripting. It also eliminates the need for separate entries for repeated data items.

Formats for the OCCURS clause include fixed-length tables and variable-length tables.

The subject of an OCCURS clause is the data-name of the data item that contains the OCCURS clause. Except for the OCCURS clause itself, data description clauses used with the subject apply to each occurrence of the item described.

Whenever the subject of an OCCURS clause or any data-item subordinate to it is referenced, it must be subscripted or indexed, with the following exceptions:

When subscripted or indexed, the subject refers to one occurrence within the table. When not subscripted or indexed, the subject references the entire table.

The OCCURS clause cannot be specified in a data description entry that:


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)