Variable-length tables

You can specify variable-length tables by using the OCCURS DEPENDING ON clause.

Format 2: variable-length tables

Read syntax diagramSkip visual syntax diagramOCCURSinteger-1TOinteger-2 TIMESDEPENDINGONdata-name-1ASCENDINGDESCENDINGKEYISdata-name-2INDEXEDBYindex-name-1
integer-1
The minimum number of occurrences.

The value of integer-1 must be greater than or equal to zero, and it must also be less than the value of integer-2.

If integer-1 is omitted, a value of 1 is assumed and the keyword TO must also be omitted.

integer-2
The maximum number of occurrences.

integer-2 must be greater than integer-1.

The length of the subject item is fixed. Only the number of repetitions of the subject item is variable.