Skip to content

PL/I record layouts: storage widths, the main-procedure COMMAREA, DTOs (#3623 part 2) #3720

Closed

Description

@squid-protocol

Part 2 of #3623 (Part 1: PL/I programs through the pipeline, PR to follow).

With PL/I programs now in the pipeline, the remaining gap is their data layouts:

  • COMMAREA DTOs: a PL/I CICS program receives its COMMAREA as the parameter of its main procedure (R001B1: PROC(COMMAREA_PEKER) OPTIONS(MAIN);), a pointer to a structure BASED on it. program_interfaces("pli") has no DFHCOMMAREA to read and no widths for the callers' PL/I structures, so only 14 of DSF's 409 CICS programs get a COMMAREA DTO.
  • VSAM keys: 0 of DSF's 58 VSAM stores are keyed by one field, because the record widths are unknown.
  • DECLARE structures as DTOs/entities: record_data carries PL/I DECLAREs (Engine: extract PL/I DECLARE structures as a fact channel (PL/I record layouts) #3250) with their PL/I types in usage, but record_layout sizes only COBOL PICTURE/USAGE.

Needs:

  1. PL/I storage widths in galaxy_ir._elementary_bytes:
    • CHAR(n): n bytes; CHAR(n) VARYING: n + 2;
    • BIT(n): ceil(n/8) bytes, unaligned;
    • FIXED DEC(p,q): p/2 + 1 bytes; FIXED BIN(15): 2; FIXED BIN(31): 4; FIXED BIN(63): 8;
    • FLOAT DEC/BIN: 4 or 8; PIC '...': picture positions; PTR: 4 / 8;
    • dimensions multiply; LIKE expands; REFER is variable;
    • alignment: ALIGNED padding per the PL/I rules, UNALIGNED none. This is the hard part: document the rule and test it against IBM's structure-mapping examples.
  2. The PL/I COMMAREA: the main procedure's parameter → the structure BASED on it, as program_interfaces basis parameter.
  3. An answer-key field for PL/I record layouts, censused (the Answer key: compare RIDFLD and record-layout offsets/widths (unverified attributes the Java generator consumes) #3649 layouts census method).

Part of #3625.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope:frontier

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions