Skip to content

Occurs depending on mappings #151

Closed
Closed
@tr11

Description

@tr11

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedAccepted for implementationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions