OCCURS clauses

An OCCURS clause requires special handling, because the Acu4GL runtime system must assign a unique name to each database column. The runtime accomplishes this by appending sequential index numbers to the item named in the OCCURS.

For example, if the following were part of a file's description:

03  employee-table occurs 20 times.
    05  employee-number pic 9(3)

then these column names would be created in the database table:

employee_number_1
employee_number_2
.
.
.
employee_number_10
employee_number_11
.
.
employee_number_20
Note: The hyphens in the COBOL code are translated to underscores in database field names, and the index number is preceded by an extra underscore.

AcuXDBC users can make use of the SUBTABLE directive to modify how OCCURS clauses are handled. The alfred record editor shows only the names of the fields, without subscripts or indexes. See SUBTABLE Directive (AcuXDBC use only) for more information.