Closed
Description
I have a few copybooks that have groups occurring depending on a flag on some field as follows:
02 FIELD_TYPE PIC X.
02 RECORD_TYPE_A OCCURS 0 TO 1 TIMES DEPENDING ON FIELD_TYPE.
....
02 RECORD_TYPE_B OCCURS 0 TO 1 TIMES DEPENDING ON FIELD_TYPE.
....
In this example, if FIELD_TYPE
is A
, then only RECORD_TYPE_A
is defined. Same for B
.
Maybe we could support something like this by allowing OCCURS
clauses to point to non-integer fields together with some sort of mapping.
If this sounds good, I can come up with a PR that does this.