Repository navigation
Mainframe fact channel: IMS DL/I calls and the segment matrix (#3450) - #3478
Merged
Merged
Conversation
IMS database calls were invisible: nothing said which programs read or update which IMS segments. core/dli_calls.py: one row per EXEC DLI command (the command, PCB(...), each SEGMENT(...) of a path call, INTO / FROM, WHERE(...), SCHD PSB((name))) and per CALL 'CBLTDLI' / 'AIBTDLI' (function operand, PCB mask, I/O area, SSAs -- read with the #3454 USING reader), operands as written -> dli_call_data. galaxy_ir: EngineDliCall / EngineFile.dli_calls and - ims_calls(): a CBLTDLI function code resolved through its data item's VALUE (FUNC-GU lives in a copybook) and each SSA decoded from its group's COPY-expanded VALUEs -- segment name, `(FIELD OP` qualification or `*` command codes; EXEC WHERE clauses paired with their segments; - ims_segment_access(): the program x segment matrix (the IMS counterpart of sql_table_access). A path call acts on its last segment and reads the parents it positions through. CardDemo: 35 calls over PAUTSUM0 / PAUTDTL1 in 7 programs -- e.g. COPAUA0C reads / updates / inserts PAUTSUM0 and inserts PAUTDTL1 under it; CBPAUP0C reads and deletes both; DBUNLDGS reads both and ISRTs its GSAM PCBs (no SSA). Ground truth: an independent reader (add-dli) with its own copybook lookup and PIC-width VALUE decoding, and two scored fields, "DL/I calls" and "IMS segment access" (drafted). Engine matches the key exactly: CardDemo 35/35 calls and 20/20 segment accesses (no IMS in CBSA or zopeneditor). Golden masters unchanged (no IMS in the crucible corpus). PSB / DBD generation sources are not scanned yet; follow-up issue. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
Contributor
squid-protocol
added a commit
that referenced
this pull request
Sep 24, 2026
…#3478) IMS database calls were invisible: nothing said which programs read or update which IMS segments. core/dli_calls.py: one row per EXEC DLI command (the command, PCB(...), each SEGMENT(...) of a path call, INTO / FROM, WHERE(...), SCHD PSB((name))) and per CALL 'CBLTDLI' / 'AIBTDLI' (function operand, PCB mask, I/O area, SSAs -- read with the #3454 USING reader), operands as written -> dli_call_data. galaxy_ir: EngineDliCall / EngineFile.dli_calls and - ims_calls(): a CBLTDLI function code resolved through its data item's VALUE (FUNC-GU lives in a copybook) and each SSA decoded from its group's COPY-expanded VALUEs -- segment name, `(FIELD OP` qualification or `*` command codes; EXEC WHERE clauses paired with their segments; - ims_segment_access(): the program x segment matrix (the IMS counterpart of sql_table_access). A path call acts on its last segment and reads the parents it positions through. CardDemo: 35 calls over PAUTSUM0 / PAUTDTL1 in 7 programs -- e.g. COPAUA0C reads / updates / inserts PAUTSUM0 and inserts PAUTDTL1 under it; CBPAUP0C reads and deletes both; DBUNLDGS reads both and ISRTs its GSAM PCBs (no SSA). Ground truth: an independent reader (add-dli) with its own copybook lookup and PIC-width VALUE decoding, and two scored fields, "DL/I calls" and "IMS segment access" (drafted). Engine matches the key exactly: CardDemo 35/35 calls and 20/20 segment accesses (no IMS in CBSA or zopeneditor). Golden masters unchanged (no IMS in the crucible corpus). PSB / DBD generation sources are not scanned yet; follow-up issue. Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g Co-authored-by: Claude Opus 5.5 <[email protected]>
squid-protocol
added a commit
that referenced
this pull request
Sep 24, 2026
* Mainframe fact channel: batch CALL USING contracts (#3454) #3355 matched CICS COMMAREAs to the callee's DFHCOMMAREA; a batch `CALL 'X' USING A B C` passes its data positionally to the callee's `PROCEDURE DIVISION USING P Q R`, and neither side was recorded, so an arity or length mismatch was invisible. core/call_using.py: - a CALL's USING list, by position (BY CONTENT / BY VALUE prefix the items that follow, `A OF B` kept, subscripts dropped, ADDRESS OF / LENGTH OF / OMITTED / literals as written), ending at RETURNING / ON / NOT / END-CALL / a period / the next verb -> call_site_data.using_args (a column, like #3355's COMMAREA; healed onto older tables; only on a CALL that has one, so every other row keeps its shape); - each PROCEDURE DIVISION [USING] and ENTRY 'X' [USING] -> entry_point_data. Sequence fields are blanked once per file (a slice would misplace cols 73-80). galaxy_ir: EngineCall.using_args, EngineEntryPoint / EngineFile.entry_points, and GalaxyIR.call_contracts(): each CALL paired with its callee's entry (the ENTRY the target names, else the PROCEDURE DIVISION) -- status paired / arity_mismatch / callee_unresolved / callee_no_using / caller_no_using -- and per position the argument's and parameter's byte length (record_layout, COPY-expanded) and length_match. CardDemo: CBSTM03A -> CBSTM03B (13 sites, 1040 = 1040 bytes), CORPT00C / COTRN02C -> CSUTLDTC (10/10/80 = 10/10/80); the other 43 CALLs go to LE / MQ services outside the repo. zopeneditor: SAM1 -> SAM2 (4 and 5 arguments). Ground truth: an independent reader (add-call-using) and a scored field "CALL USING" (drafted). Engine matches the key exactly: CardDemo 71/71, CBSA 22/22, zopeneditor 5/5. Golden masters: a USING field on 227 call sites (purely additive) and new Entry Points blocks. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g * Mainframe fact channel: IMS DL/I calls and the segment matrix (#3450) (#3478) IMS database calls were invisible: nothing said which programs read or update which IMS segments. core/dli_calls.py: one row per EXEC DLI command (the command, PCB(...), each SEGMENT(...) of a path call, INTO / FROM, WHERE(...), SCHD PSB((name))) and per CALL 'CBLTDLI' / 'AIBTDLI' (function operand, PCB mask, I/O area, SSAs -- read with the #3454 USING reader), operands as written -> dli_call_data. galaxy_ir: EngineDliCall / EngineFile.dli_calls and - ims_calls(): a CBLTDLI function code resolved through its data item's VALUE (FUNC-GU lives in a copybook) and each SSA decoded from its group's COPY-expanded VALUEs -- segment name, `(FIELD OP` qualification or `*` command codes; EXEC WHERE clauses paired with their segments; - ims_segment_access(): the program x segment matrix (the IMS counterpart of sql_table_access). A path call acts on its last segment and reads the parents it positions through. CardDemo: 35 calls over PAUTSUM0 / PAUTDTL1 in 7 programs -- e.g. COPAUA0C reads / updates / inserts PAUTSUM0 and inserts PAUTDTL1 under it; CBPAUP0C reads and deletes both; DBUNLDGS reads both and ISRTs its GSAM PCBs (no SSA). Ground truth: an independent reader (add-dli) with its own copybook lookup and PIC-width VALUE decoding, and two scored fields, "DL/I calls" and "IMS segment access" (drafted). Engine matches the key exactly: CardDemo 35/35 calls and 20/20 segment accesses (no IMS in CBSA or zopeneditor). Golden masters unchanged (no IMS in the crucible corpus). PSB / DBD generation sources are not scanned yet; follow-up issue. Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g Co-authored-by: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3450. Part of #3445. Stacked on #3475, which sits on #3474. GitHub retargets each PR as the one below it merges.
What
core/dli_calls.py: one row per IMS call, operands as written →dli_call_data.PCB(...), eachSEGMENT(...)of a path call,INTO/FROM,WHERE(...), andSCHD PSB((name)).CALL 'CBLTDLI'/'AIBTDLI': the function operand, PCB mask, I/O area and SSAs, read with the Mainframe fact channel: batch CALL USING parameter contracts #3454 USING reader.New joins in
galaxy_ir:ims_calls():FUNC-GUlives in a copybook.(FIELD OPqualification or*command codes.ims_segment_access(): the program × segment matrix, the IMS counterpart ofsql_table_access. A path call acts on its last segment and reads the parents it positions through.CardDemo
35 calls over PAUTSUM0 / PAUTDTL1 in 7 programs:
Ground truth
add-dli, with its own copybook lookup and its own PIC-width VALUE decoding.DL/I callsandIMS segment access, drafted.Not in this PR
PSB / DBD generation sources aren't scanned yet, so PCBs aren't resolved to databases. That's #3477.
Checks
🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g