Skip to content

equivalence/det: ESDS browse by RBA on both sides; prove IBM DBB EPSMLIST (#4213) - #4236

Merged
squid-protocol merged 2 commits into
mainfrom
feat/4213-esds-rba-browse
Oct 3, 2026
Merged

squid-protocol merged 2 commits into
mainfrom
feat/4213-esds-rba-browse

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Closes #4213.

What

IBM DBB MortgageApplication's EPSMLIST browses its ESDS EPSMORTF by relative byte address (STARTBR ... RIDFLD(RID-LENGTH) RBA EQUAL, then READNEXT ... RBA). The harness refused that, and the det translator dropped RBA without a word and browsed by key. This PR models the RBA browse on both sides of the proof, proves EPSMLIST, and lets mortgage-cmort run its PF9 and ENTER-from-list paths, which LINK EPSMLIST.

Semantics implemented (IBM CICS TS 6.x)

The COBOL side is ggcics.c (rba_startbr / rba_read). The Java side is CicsTask (withEsds, startbrRba / readnextRba / readprevRba, rba / rbaBytes). The det translator emits the Java calls (det/cics.py rba_browse).

  • RIDFLD holds an RBA. STARTBR / READNEXT / READPREV, option RBA: RIDFLD "contains a relative byte address". It is read as a big-endian fullword.
  • RBA applies to the whole browse. STARTBR, RBA: it "applies to every READNEXT or READPREV command in the browse, and causes CICS to return the relative byte address of each retrieved record". READNEXT / READPREV set RIDFLD to the RBA of the record they read.
  • EQUAL is the ESDS default. STARTBR, EQUAL: "the default for a direct ESDS browse". GTEQ "is not valid for directly browsing an ESDS", so the translators refuse GTEQ (and KEYLENGTH) with RBA.
  • X'FF's position at the end. "Sequential reading (browsing)": "To position the browse at the last record in the file, ready for a backward browse, specify a RIDFLD of X'FF' characters ... For a standard ESDS, specify the RBA option."
  • READPREV right after STARTBR. READPREV: "your STARTBR command RIDFLD must specify the key of a record that exists on the data set". Here that is the STARTBR's record.
  • Repositioning. "Sequential reading": "When you set RIDFLD to reposition a browse, the record identifier must be in the same form as on the previous STARTBR or RESETBR command (key, RBA, XRBA, or RRN)". A changed RBA repositions to that record.
  • Direction changes, ENDFILE (20/90), INVREQ (16/33, 34, 35), LENGERR. These follow the existing keyed-browse rules, in RBA order.
  • Fault injection. The existing faults mechanism works unchanged (STARTBR / READNEXT plans on both sides, used by two new scenarios).

Oracle assumptions added

Register X13 (oracle_assumptions.md):

  • An ESDS holds fixed-length records in arrival order, and a record's RBA is its byte offset (record n at n × reclen).
  • On z/OS an RBA is a control-interval offset. Past the first CI, real RBAs are larger whenever records do not fill a CI exactly.
  • EPSMLIST only starts at RBA 0 and passes back the RBAs it was given, so it cannot see the difference. A program that computes an RBA could.
  • A case may state an ESDS the estate never defines (datasets.<name>.csd: {organization: ESDS, reclen, why}). MortgageApplication ships no CSD or IDCAMS for EPSMORTF.
  • An IDCAMS NONINDEXED DEFINE with fixed RECORDSIZE is read as an ESDS.

Still refused, by name

At run time, exit 98 or UnsupportedOperationException, "... not modelled":

  • an RBA at which no record starts. IBM does not say whether this gives NOTFND, INVREQ or ILLOGIC. RBAs past the end of the data are included.
  • RBA on a file that is not an ESDS (a KSDS by RBA);
  • a keyed READ / WRITE / DELETE / STARTBR on an ESDS;
  • a browse that mixes RBA and key commands;
  • an RBA RIDFLD shorter than a fullword.

By the translators: XRBA, RRN (RRDS), READ / WRITE / DELETE by RBA, and GTEQ / KEYLENGTH with RBA.

EPSMLIST proof status

  • mortgage-mlist (new): PROVED by the det port. 9 scenarios: ENTER, WHEN OTHER, CLEAR, PF3, PF12, EIBCALEN 0 (X12), an injected STARTBR NOTFND and an injected READNEXT IOERR. Coverage is 5/6 paragraphs and 14/15 branches. Each list scenario browses RBA 0, 56, 112, 168, then ENDFILE, then ENDBR.
  • Not reached: a company that passes A150's test LINKs EPSCSMRT, which is refused (NUMPROC(MIG), C5). So no scenario lists a company, and no record's contents reach an output. The proof judges the browse by its outcomes. The RBA rules themselves are pinned rule by rule on both sides by the new unit cells.
  • mortgage-cmort: now runs EPSMLIST in the same task (programs). It adds pf9-list and enter-from-list and is still PROVED: 9 scenarios, branches 12/21 → 15/21.

Tests (each failed on main)

  • tests/cics_crucible/test_cics_runtimes.py:
    • one 27-step RBA browse run through the C stub and through CicsTask, with identical expected output;
    • 6 named refusals in the stub (exit 98) and 3 in CicsTask;
    • the fullword helpers.
  • tests/cobol_mainframe/test_equivalence_cics.py:
    • RBA translation, and refusal of the other RBA forms;
    • an ESDS stated by the case;
    • an ESDS compared in arrival order.
  • tests/cobol_mainframe/test_det_translate.py: the det emission for STARTBR / READNEXT / READPREV RBA, and its holes.
  • An existing assertion moved index: a keyed READNEXT / READPREV now sets GG-FLAGS explicitly.

Golden drift

Pending: the local pr_gates run is in progress. Golden masters are not expected to move (no scanner change).

Checks

Pending: proof sweep and pr_gates are running locally.

Also

  • det_port_design.md "What the proofs found" records the translator's dropped-RBA defect. It is not a fact-channel field, so there is no field-testing log entry.
  • estate4_dbb_mortgage.md is updated.

🤖 Generated with Claude Code

https://claude.ai/code/session_013sNMtAg6s9dyyjNgnjRHi8

… DBB EPSMLIST (#4213)

STARTBR / READNEXT / READPREV ... RBA, modelled where IBM's STARTBR / READNEXT /
READPREV reference and "Sequential reading (browsing)" pin it: RIDFLD a fullword
RBA, returned by each read; EQUAL the ESDS default (GTEQ refused); X'FF's at the
end for READPREV; repositioning by RBA. ggcics.c (files.cfg ESDS flag), CicsTask
(withEsds, startbrRba / readnextRba / readprevRba) and the det translator, which
had silently dropped RBA and browsed by key. RBAs addressing no record, RBA on a
non-ESDS, keyed commands on an ESDS and mixed browses are refused by name;
XRBA, RRN and READ / WRITE / DELETE by RBA stay refused. Register X13.

A case may state an ESDS the estate never defines (datasets.<name>.csd). New
case mortgage-mlist (EPSMLIST, proven, 9 scenarios); mortgage-cmort runs EPSMLIST
on PF9 and ENTER from the list (9 scenarios, 15/21 branches).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_013sNMtAg6s9dyyjNgnjRHi8
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

equivalence/det: ESDS browse by RBA (STARTBR/READNEXT ... RBA) is refused -- blocks IBM DBB EPSMLIST

2 participants