Data Definition Language (DDL) Reference Manual
Definition Attributes
Data Definition Language (DDL) Reference Manual—529431-004
6-23
OCCURS DEPENDING ON
COBOL output for the INDEXED BY attribute:
OCCURS DEPENDING ON
For DDL and COBOL source code, the OCCURS DEPENDING ON clause repeats a
field or group a variable number of times, depending on the current value of an integer
variable.
For source code in other languages, the OCCURS DEPENDING ON clause repeats a
field or group the specified maximum number of times.
min
is the minimum number of times the field or group can repeat. You can specify min
either as an integer or as the name of a constant in the open dictionary. The value
of min must be an integer from 0 through 32,767.
max
is the maximum number of times the field or group can repeat. You can specify
max either as an integer or as the name of a constant in the open dictionary. The
value of max must be a positive integer greater than or equal to the value of min.
field-name
is the name of a numeric field within the same definition. The value of field-
name must be a positive integer.
index-name
is the name of a field to use as an index. The maximum length of index-name is
30 ASCII characters.
DDL Code COBOL Code
DEF xyz
02 abc TYPE BINARY
OCCURS 3 TIMES
INDEXED BY ix.
END.
01 XYZ.
02 ABC NATIVE-2
OCCURS 3 TIMES
INDEXED BY IX.
OCCURS min TO max TIMES DEPENDING ON field-name
[ INDEXED BY index-name ]
Note. Use INDEXED BY index-name only for COBOL.