Repository navigation
Mainframe fact channel: field-level data lineage (#3452) - #3484
Merged
Merged
Conversation
Contributor
core/data_moves.py records one source -> target row per MOVE / COMPUTE / ADD / SUBTRACT / MULTIPLY / DIVIDE / STRING / UNSTRING / INITIALIZE (data_move_data): operands as written, qualifiers kept, subscripts dropped, reference modification flagged, EXEC blocks and control operands (delimiters, POINTER, COUNT IN, TALLYING) skipped. GalaxyIR.data_flows resolves both operands to storage (record, offset, bytes, one occurrence's bytes) with a COPY-expanded span walk, so group moves and REDEFINES meet by storage and a copybook item answers to the program group it expands under. Procedure copybooks resolve per includer. Status: resolved / source_unresolved / target_unresolved / ambiguous / system (EIB, DIB, SQLCA, DFH constants, special registers); truncates flags a MOVE into a shorter alphanumeric/group target. GalaxyIR.field_lineage follows a field forward or backward through moves (a group MOVE keeps the field's offset), CALL USING and COMMAREA storage, tagging FD / SQL / DL/I / CICS FILE-MAP-QUEUE-CONTAINER endpoints; undeclared names end the trail as stub hops. Record parser fix found by the key's independent widths: a level-number line continuing an 88's VALUE list (`VALUES` + `1 THROUGH 12.`) is no longer a phantom 01 item (carddemo CSUTLDWY; golden re-blessed, the only non-additive change). Answer key: independent reader + widths (add-data-moves), scored fields "data moves" (CardDemo 5171/5171, CBSA 5179/5179, zOpenEditor 323/323) and "MOVE truncation" (82/82, 1/1, 9/9); ledger flag data_moves_validated. Closes #3452 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
squid-protocol
force-pushed
the
feat/field-lineage-3452
branch
from
September 24, 2026 14:29
f6d7d9f to
3d35eda
Compare
…attern byte-identical) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
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.
Part of epic #3445. Stacked on #3483 (base
feat/ims-gen-3477). Merge #3483 first, then retarget this PR to main.What it does
Extraction (
core/data_moves.py→data_move_data):Reader (
GalaxyIR):data_flows()resolves both operands to storage: record, offset, bytes and one occurrence's bytes, via a COPY-expanded span walk.COMM-SCODE OF UPDCUST-COMMAREA).COPY CSUTLDPY.in the PROCEDURE DIVISION) resolves once per including program.statusis resolved | source_unresolved | target_unresolved | ambiguous | system (EIB / DIB / SQLCA / DFH constants / special registers).truncatesflags a MOVE into a shorter alphanumeric or group target.field_lineage(file, item, direction)follows a field forward or backward:Example (CBSA):
COMM-NAME OF UPDCUST-COMMAREAin BNK1DCS → LINK → UPDCUSTDFHCOMMAREA→CUSTOMER-NAME→ cics FILE CUSTOMER update. Backward, it reachesCUSTNAMI, a field of the generated map.Engine fix found by the key
The key's independent widths disagreed with the engine on 4 CardDemo truncations. Root cause:
_cobol_recordsread the continuation line1 THROUGH 12.of an88 … VALUESlist as a new level-01 itemTHROUGH. That closed the date group early (6 bytes instead of 8) and wrongly re-parented later items.VALUE(S)or a comma).03 CA-CUSPOL-REQUEST.Ground truth
Independent key reader:
cobol_answer_key.py add-data-moves. It has its own statement cutting over the literal-blanked text, parks literals, and reads operand lists sequentially. It also computes its own PIC widths, splicing COPY members into groups.Ledger flag:
data_moves_validated(drafted; the census is still owed). The truncations are real findings, for exampleMOVE 'DSNTIAC CD: '(12 characters) intoPIC X(10), andWS-MESSAGEintoERRMSGO.Checks
data_moves.json). The only change to an existing file is CSUTLDWY's record layout: 3 phantomTHROUGHitems removed and 6 items re-parented, which is exactly the parser fix.Scope notes
Names that only exist after
COPY … REPLACING(zOpenEditor's:TAG:copybooks) stay unresolved, because record_data keeps the copybook's own names. SET, ACCEPT and READ INTO are not rows.Closes #3452
🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g