Skip to content

cannot compile with using complex-odo #585

Open
@tsh-hashimoto

Description

@tsh-hashimoto

If there are variable-length data items (e.g. OCCURS ~ DEPENDING ON) in WORKING-STORAGE SECTION (not at the end, but in the middle), we can compile source file with complex-odo: yes in configuration file.

But, for example, the following cannot compile.

        WORKING-STORAGE SECTION.
        01  A.
            02  B               PIC 9(8) BINARY.
            02  FILLER01        OCCURS 227 DEPENDING ON B
                                PIC X(1).
            02  C               PIC S9(004) COMP.

The generated Java source code appears to contain C source code as is (b_C__A + 4 + 227.fillBytes(0, 2);).

/* Initialize program */
if (!this.initialized) {
  module.setProgramId("TEST01");

  b_RETURN_CODE.set((int)0);
  b_B__A.fillBytes(0, 4);
  b_FILLER01__A.getSubDataStorage(0).fillBytes(' ', 227);
  b_C__A + 4 + 227.fillBytes(0, 2);
  this.initialized = true;
}

This should be b_C__A.getSubDataStorage(4 + 227).fillBytes(0, 2);.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions