Skip to content

Mainframe fact channel: IMS DL/I database access (CBLTDLI / EXEC DLI) #3450

Closed

Description

@squid-protocol

Problem

IMS database calls are invisible. The engine can't say which programs read or update which IMS segments.

Evidence

35 CALL 'CBLTDLI' / EXEC DLI calls in CardDemo (functions GU / GN / GNP / ISRT / REPL / DLET against PCBs and segment SSAs), e.g. app/app-authorization-ims-db2-mq/cbl/PAUDBLOD.CBL, PAUDBUNL.CBL and DBUNLDGS.CBL.

Proposal

A per-file channel: the DL/I function (literal, or resolved through VALUE), the PCB, the segment name, and the qualification from the SSA. Where PSB and DBD sources exist in the repository, resolve to them. It's the IMS counterpart of the SQL table-usage channel.

Acceptance (ground truth, as for every channel since #3210)

  • An independent draft reader in tests/tools/cobol_answer_key.py. It must not import the engine; test_draft_readers_never_import_the_parsers_they_grade enforces this.
  • A new answer-key section, drafted for all three pinned corpora (zopeneditor, CBSA, CardDemo).
  • A blind census of that section with tests/tools/cross_verify.py census, with every disagreement ruled against the source.
  • A new scored field in tests/tools/ground_truth_ledger.py, so mainframe-ground-truth.yml fails CI on any regression.
  • The channel follows gitgalaxy/core/how_to_add_a_fact_channel.md: extractor, *_data table, delta restore, galaxy_ir.EngineFile reader and SCOPE update.

Part of #3445.

🤖 Generated with Claude Code

Activity

  1. added
    enhancement
    core-engine
    legacy-modernization
    on Sep 24, 2026
  2. squid-protocol commented on Sep 24, 2026

    @squid-protocol
    OwnerAuthor

    Done. The channel landed on main via #3478 → #3475, and the blind census is #3481.

    What shipped

    • core/dli_calls.py → the dli_call_data table: EXEC DLI commands (PCB, SEGMENT path, INTO/FROM, WHERE, SCHD PSB) and CALL 'CBLTDLI' / 'AIBTDLI' calls (function operand, PCB mask, I/O area, SSAs).
    • GalaxyIR.ims_calls() resolves CBLTDLI function codes through copybook VALUEs and decodes each SSA from its group VALUEs: the segment, then either a (FIELD OP qualification or * command codes.
    • GalaxyIR.ims_segment_access() is the program × segment matrix. A path call acts on its last segment and reads its parents.

    Acceptance

    • Independent reader: add-dli, with its own copybook lookup and its own PIC-width VALUE decoding.
    • Scored fields DL/I calls and IMS segment access. The engine matches the key exactly: CardDemo 35/35 and 20/20.
    • Blind census (Ground truth: blind census of CALL USING and DL/I key sections (#3454, #3450) #3481): 100% coverage, 0 disagreements after two spelling normalisations. Both fields are now cross_verified.
    • Fact-channel spine: extractor, table, delta restore, IR reader and SCOPE.

    Follow-up: #3477 scans PSB/DBD sources, so PCBs can be resolved to databases and SENSEG / PROCOPT checked.

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-modernization

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions