Skip to content

det + stub: EXEC CICS RETURN ... IMMEDIATE and LINK ... SYNCONRETURN (Part of #4270) - #4739

Merged
squid-protocol merged 3 commits into
mainfrom
feat/4270-return-immediate-synconreturn
Oct 9, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
feat/4270-return-immediate-synconreturn

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Part of #4270 (slice: RETURN ... IMMEDIATE, LINK ... SYNCONRETURN).

What

After #4728 the census named RETURN IMMEDIATE (9 programs, 5 of them the CBSA set BNK1CAC / BNK1CRA / BNK1DAC / BNK1DCS / BNK1TFN) and LINK SYNCONRETURN (10 programs) as the next blockers. Both were refused whole ("IMMEDIATE ignored" was the old test comment: no corpus program may have the option silently dropped). IBM is the reference (CICS TS 6.x), register X27:

  • RETURN TRANSID(x) [COMMAREA LENGTH] IMMEDIATE (EXEC CICS RETURN): "ensures that the transaction specified in the TRANSID option is attached as the next transaction regardless of any other transactions enqueued by ATI for this terminal. The next transaction starts immediately and appears to the operator as having been started by terminal data"; the COMMAREA "is passed to the next program that runs at the terminal". CicsTask.returnImmediate / GGCRETI end the task with a RETURN event that says immediate; the cics-crucible runner (both sides) attaches the task at once, at the same virtual time, ahead of any expired START request, without using up the terminal's next operator step (a new immediate trigger). It can fail and then returns to the program: INVREQ RESP2 1 (task with no terminal), INVREQ RESP2 2 (below the highest logical level), LENGERR RESP2 11 (COMMAREA length below 0 or past 32763), all as IBM lists them. Nothing is guessed: the task's terminal is a stated fact (withTermid, $GGCICS_FACILITY; unstated in the stub, refused).
  • LINK ... SYNCONRETURN (EXEC CICS LINK): "SYNCONRETURN is only applicable to remote links, it is ignored if the link is local." Every program here is local (SYSID stays refused by name), so the option is accepted and changes nothing: the linked program does not get a unit of work of its own, a SYNCPOINT in it is the caller's. The remote-only conditions (INVREQ RESP2 14, ROLLEDBACK RESP2 29, SYSIDERR, TERMERR) cannot occur.
  • Refused by name (X27): IMMEDIATE without TRANSID (IBM does not say what it attaches); a task with no terminal below level 1 (IBM lists INVREQ RESP2 1 and 2 and no precedence). Assumed: the immediate task's STARTCODE is TD. IBM does not state the immediate task's EIBAID or what a terminal RECEIVE returns in it, so the runner gives it none (the log's eibaid is null) and the case reads neither.

The spec entries (gitgalaxy/standards/cics/commands/program.py) gain IMMEDIATE, SYNCONRETURN and RETURN's INVREQ / LENGERR outcomes; the stub reads them.

Proof (against the case branch, --unpinned: no tag, no pin bump)

New cics-crucible case pseudo-conversational/pc-return-immediate (companion PR below), 4 scenarios hand-traced from IBM's pages (immediate, synconreturn, link-level2, no-terminal): cobol-stub 4/4; java-ported (det port, 34 + 12 + 7 + 5 statements, 0 holes) 4/4. det_port.py check vs origin/main: 79/79 ports unchanged (no translation moved). proof_sweep.py --det-only --skip-db2: "sweep: as expected" (mortgage-mpmt NOT PROVEN, a baseline entry; Db2 cases skipped, as the det-sweep workflow does; the first run caught my stub-side XCTL parse bug, fixed in this PR). pr_gates --ratchets 7/7, --fast 5/5. evidence.py status: the same 45 records stale as on origin/main (harness / generator / oracle fingerprints; none stale by this slice's port, case, corpus, differences or options). Unit tests for the translator, the CicsTask runtime, the stub C, the harness, the spec entries and the crucible event table (the table check leaves the keys the pinned schema lacks out until the pin moves: crucible_events.UNRELEASED).

Census (before -> after, translation only, burned + census corpora, base 63c1a6a)

  • RETURN / LINK holes naming the verb: 19 -> 0.
  • The five CBSA programs: BNK1CAC 385/389 -> 387/389, BNK1CRA 312/317 -> 314/317, BNK1DAC 338/345 -> 341/345, BNK1DCS 641/648 -> 645/648, BNK1TFN 345/349 -> 347/349 (also BNK1CCA 231/234 -> 232/234, BNK1CCS 569/573 -> 571/573, BNK1UAC 435/441 -> 438/441).
  • Programs translated whole: 78 -> 79 (non-burned 5 -> 5): BNKMENU (358/366 -> 366/366). The five CBSA programs are still not whole. I did not take an extra blocker in: the ones left are not small. Next blockers they name:
    • COMPUTE FUNCTION NUMVAL in a floating-point expression (oracle_assumptions.md C6): BNK1CAC and BNK1TFN (whole with it: it is their only gap), BNK1CRA (also an INQUIRE), BNK1UAC
    • SET ... TO NULL pointers: BNK1DAC (its only remaining holes, 4 statements), BNK1DCS, BNK1UAC, BNK1CCA: it needs a decision on the 4-byte (IBM) vs 8-byte (GnuCOBOL) pointer in a COMMAREA (the "data after a POINTER" refusal CREACC and INQACCCU already carry)
    • RECEIVE MAP ... ASIS: BNK1DCS, BNK1CCS
    • INQUIRE (BNK1CRA)

Cross-repo

Companion: squid-protocol/cics-crucible#13 (the case, plus the additive SPEC change: the immediate trigger kind, RETURN's optional immediate / resp / resp2, schema and validate.py). Merge it first, then a crucible release + pin bump (not done here; the pin is untouched, so CI's cics-crucible job does not see the new case until then).

🤖 Generated with Claude Code

https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D

squid-protocol and others added 3 commits October 8, 2026 20:58
…(Part of #4270)

RETURN TRANSID ... IMMEDIATE attaches TRANSID's task at once with the COMMAREA, ahead of
the terminal's next input (CicsTask.returnImmediate, GGCRETI, the crucible runner's new
`immediate` trigger); INVREQ RESP2 1 (no terminal) / 2 (below the highest level) and LENGERR
RESP2 11 return to the program. LINK SYNCONRETURN is "ignored if the link is local" (IBM), so
it is accepted and does nothing. What IBM leaves open is refused by name (register X27).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
…'s own (an XCTL always has one)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MQNoe4wPJgr7dbUvs3DG6D
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol marked this pull request as ready for review October 9, 2026 02:16
@squid-protocol
squid-protocol merged commit c5d6f79 into main Oct 9, 2026
42 checks passed
@squid-protocol
squid-protocol deleted the feat/4270-return-immediate-synconreturn branch October 9, 2026 02:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, sensor, or structural signature legacy-modernization COBOL refractor, dead-code extraction, and JCL forging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant