Skip to content

IDCAMS step oracle model: REPRO, DELETE, DEFINE CLUSTER, condition codes (Part of #8880) - #8931

Merged
squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8880-20261121T1820Z
Nov 21, 2026
Merged

squid-shepherd[bot] merged 1 commit into
mainfrom
churn/8880-20261121T1820Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

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.py runs 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) and IF LASTCC|MAXCC ... THEN/ELSE/DO/END. Every command or keyword outside that raises Refused by 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.py running an IDCAMS step between program steps and comparing its RC

Remaining slices

  1. Java runtime for the same deck (cobolrt), proven against the model.
  2. Job harness wiring in 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.py all clear; pinned ruff format clean; register.py --check clean; test file runs in 0.2 s.

Lessons for agents

  • dead_key_audit flags a dict subscript read once (ends["IN"]) and ruff RUF007 flags zip(x, x[1:]): use itertools.pairwise and unpack from sorted(ends).

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 21, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 21, 2026 18:49
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 21, 2026 19:09
@squid-protocol squid-protocol added shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md and removed shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md labels Nov 21, 2026
@squid-shepherd
squid-shepherd Bot merged commit d02b232 into main Nov 21, 2026
98 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8880-20261121T1820Z branch November 21, 2026 20:06
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

1 similar comment
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant