ContentsIndexPreviousNext

OCCURS clauses

An OCCURS clause always 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 that the hyphens in the COBOL code are translated to underscores in database field names, and the index number is preceded by an extra underscore.
The alfred record editor shows only the names of the fields, without subscripts or indexes.