Repository navigation
IDCAMS step oracle model: REPRO, DELETE, DEFINE CLUSTER, condition codes (Part of #8880) - #8931
Merged
Merged
Conversation
…des (Part of #8880) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
2 of 4 tasks
Contributor
|
No description provided. |
1 similar comment
Contributor
|
No description provided. |
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 #8880 (slice 1 of 3), Part of #8878, #4890.
GnuCOBOL has no IDCAMS, so an IDCAMS step in a job case needs an oracle of our own. This adds that oracle only:
det/idcams_model.pyruns a step's SYSIN against a catalog of clusters and the step's sequential DDs and returns the step's condition code. It models REPRO (sequential <-> KSDS / ESDS, a KSDS loaded in key order), DELETE (LASTCC,SET MAXCC), DEFINE CLUSTER (KEYS, RECORDSIZE, INDEXED | NONINDEXED) andIF LASTCC|MAXCC ... THEN/ELSE/DO/END. Every command or keyword outside that raisesRefusedby name.det/idcams.py(one REPRO lowered onto COBOL) is unchanged.Evidence level: modelled and unit-tested on authored decks (80 tests: REPRO both directions, DELETE of a missing cluster with and without
SET MAXCC = 0, DEFINE then REPRO, the IF idiom, every comparison operator, ~50 refusals). Nothing is executed-equivalent: no Java runtime or harness runs an IDCAMS step yet. The oracle is this model, not z/OS. SC23-6846-60 was cited by section from memory, not re-read against the box copy; the register entry F6 says so. DELETE of a missing entry = 8 and a duplicate DEFINE = 12 are ASSUMED (F6).Checklist: done [c:eee9d129] the oracle model (REPRO, DELETE, DEFINE CLUSTER, condition codes)
Checklist: done [c:5c36b514] tests on authored decks
Checklist: partial [c:335473b3] Java runtime: none yet -- the Java step for the same deck, proven against this model
Checklist: partial [c:07bd4569] harness: none yet --
tests/tools/equivalence_job.pyrunning an IDCAMS step between program steps and comparing its RCRemaining slices
tests/tools/equivalence_job.py, then a burned-estate job case.Class / Sibling gaps
The class is IDCAMS commands and operands a job deck may use. Handled: REPRO seq<->KSDS/ESDS, DELETE, DEFINE CLUSTER, SET MAXCC, IF. Refused by name, not yet modelled: DATA/INDEX components in DEFINE CLUSTER (CardDemo decks may use them: next),
SET LASTCC, other commands (ALTER, LISTCAT, PRINT, VERIFY, EXPORT, IMPORT, BLDINDEX), REPRO FROMKEY/TOKEY/SKIP/COUNT/REPLACE/REUSE, variable-length records, empty-input and insert-mode REPRO, cataloged sequential datasets, DEFINE ALIAS/GDG/PATH/AIX, NUMBERED/LINEAR clusters.Gates
New files only (3 hand-written: model, tests, register entry F6).
audit_check.pyall clear; pinnedruff formatclean;register.py --checkclean; test file runs in 0.2 s.Lessons for agents
dead_key_auditflags a dict subscript read once (ends["IN"]) and ruff RUF007 flagszip(x, x[1:]): useitertools.pairwiseand unpack fromsorted(ends).🤖 Generated with Claude Code