Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Table handling

A table is a series of data items of equal length. These items are the table elements, or table items. They all have an identical structure and are stored contiguously. The entire table itself also forms a data item in COBOL terms.

Problems arising during the processing of large amounts of identically structured data can often be solved more satisfactorily by putting this data into tabular form. This allows an effective interpretation and meaningful representation of the information involved.

The homogeneous structure of the individual table elements makes their relationship to one another readily apparent.

The individual table element occupies an easily determined physical location relative to the base of the table, i.e. to the start of the table in working storage. Thus every element can be referenced relative to the beginning of the table and does not need to be assigned a unique data-name. A table element is accessed with the aid of a table element number, or occurrence number (see section "Subscripting" and section "Indexing").

In addition, it is possible to determine the associated occurrence number for any given value of a table element (see the section "SEARCH statement").

The number of table elements in a table may be variable at object time (see “Example 7-6” in section "Data-name or FILLER clause").