Several types of complex OCCURS DEPENDING ON (complex ODO) are possible. Complex ODO is supported as an extension to Standard COBOL 85.
The basic forms of complex ODO permitted by the compiler are as follows:
related tasks
Preventing index errors when changing ODO object value
Preventing overlay when adding elements to a variable table
related references
Effects of change in ODO object value
OCCURS DEPENDING ON clause (Enterprise COBOL Language Reference)