Skip to content

Engine: extract PL/I DECLARE structures as a fact channel (PL/I record layouts) #3250

Closed

Description

@squid-protocol

Follow-up from #3246 / roadmap #3249. Part of epic #3122.

Why

PL/I is in MAINFRAME_LANGUAGES and the boundary_extraction dialect declaration was designed so a sibling dialect can share a reading without being named cobol. PL/I DECLAREd structures are the direct analog of COBOL DATA DIVISION record layouts — a level-number hierarchy of named items with attributes — so this is the lowest-cost next fact channel: mostly a new extractor feeding the existing record_data spine.

Scope

  • Extractor for PL/I structures: DECLARE/DCL with level numbers (DCL 1 REC, 2 FIELD CHAR(10), ...), the attribute set (CHAR(n), FIXED BIN/DEC(p,s), PIC, BIT, arrays via (n) dimensions, UNION/LIKE, BASED/DEFINED as the REDEFINES analog), read from the PRISM code stream with the bounded-regex discipline. Attributes map onto the existing record_data columns where they align (pic/usage/occurs/redefines/value) — extend the schema only if an attribute has no home.
  • Declare boundary_extraction (or reuse it) for pli and return records from extract_boundary.
  • The rest is the spine, already built: _insert_per_file_child into record_data, _restore_child_table for delta scans, EngineFile.records already reads it, differential record datum already compares it, drafted answer-key records.

Acceptance

A PL/I program's structures appear in record_data / EngineFile.records; refraction_differential.py --ci compares them (real cause, not stated_absence); tests mirror test_data_division.py with real PL/I corpus shapes. Follow gitgalaxy/core/how_to_add_a_fact_channel.md and the add-fact-channel skill.

Note

Confirm the PL/I attribute→record_data column mapping before extending the table; several COBOL columns (pic, usage) are COBOL-shaped and may need a generic attributes column rather than forcing PL/I attributes into them. That mapping decision is the main design question here.

Activity

  1. added
    enhancement
    schema
    core-engine
    legacy-modernization
    on Sep 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    core-engineenhancementlegacy-modernizationschema

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions