Repository navigation
Mainframe fact channel: file definitions -- SELECT keys and VSAM defines (#3455) - #3470
Merged
Merged
Conversation
…nes (#3455) dataset_data said which DD a SELECT is assigned to and how it is opened, not how the file is organised or keyed, and nothing recorded the VSAM cluster the DD points at -- so a migration could not check a program's RECORD KEY against the cluster's key. New per-file channels (core/file_control.py): - file_control_data (cobol): each FILE-CONTROL SELECT -- organisation, access mode, RECORD / ALTERNATE (+WITH DUPLICATES) / RELATIVE keys, FILE STATUS, and the COPY members inside the file's FD entry (a record that lives wholly in a copybook: `FD CUSTOMER-INPUT. COPY CVCUS01Y.`). - vsam_define_data (jcl): each IDCAMS DEFINE CLUSTER / ALTERNATEINDEX / PATH in in-stream SYSIN -- name, organisation (INDEXED / NUMBERED / NONINDEXED / LINEAR), KEYS(l o), RECORDSIZE, AIX RELATE / UNIQUEKEY / UPGRADE, PATH PATHENTRY, the EXEC step; abbreviations (DEF, CL, AIX, RECSZ, PENT) and `-` continuations read. galaxy_ir: EngineFileControl / EngineVsamDefine and GalaxyIR.vsam_files(): each keyed SELECT's key placed at its byte offset / length in the FD record (COPY-expanded, group keys spanned), its DD followed through the job lineage to the dataset, the dataset to its CLUSTER (a PATH to the AIX it opens), and the keys compared (key_match), plus any CSD FILE on the dataset. CardDemo: 31 keyed SELECTs -- 20 match their cluster's KEYS exactly (incl. the XREF alternate key vs its AIX KEYS(11 25)); 9 have no job in the repo binding their DD; 2 (CBEXPORT / CBIMPORT) key the file on EXPORT-SEQUENCE-NUM, a WORKING-STORAGE item that is not a field of the FD record -- a definition COBOL does not allow, reported as key_in_record False. Ground truth: independent readers (add-file-defs) and two scored fields, "file control" and "VSAM defines" (drafted). Engine matches the key exactly: CardDemo 54/54 SELECTs + 24/24 defines, CBSA 1/1 + 2/2, zopeneditor 12/12. Golden masters: new File Control / VSAM Defines blocks only. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
Contributor
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 #3455. Part of #3445.
What
Two new per-file channels in
core/file_control.py:file_control_data(COBOL): each FILE-CONTROLSELECT, with:WITH DUPLICATES) and RELATIVE keys, and FILE STATUS;FD CUSTOMER-INPUT. COPY CVCUS01Y.).vsam_define_data(JCL): each IDCAMSDEFINE CLUSTER/ALTERNATEINDEX/PATHin in-stream SYSIN, with:KEYS(l o)andRECORDSIZE;RELATE,UNIQUEKEYandUPGRADE, and PATHPATHENTRY;Abbreviations (
DEF,CL,AIX,RECSZ,PENT) and-continuations are read.GalaxyIR.vsam_files()handles each keyed SELECT:key_match, along with any CSD FILE on the same dataset.CardDemo findings
31 keyed SELECTs:
KEYSexactly, including the XREF alternate key against its AIXKEYS(11 25).EXPORT-SEQUENCE-NUM. That's a WORKING-STORAGE item, not a field of the FD record, which COBOL doesn't allow. It's reported askey_in_record: False.Ground truth
add-file-defs.file controlandVSAM defines, drafted.Checks
File Control/VSAM Definesblocks.🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g