Skip to content

det: SEND CONTROL and terminal RECEIVE (INTO/SET/LENGTH/MAXLENGTH/NOTRUNCATE, LENGERR, EOC) (#4413) - #4500

Merged
squid-protocol merged 9 commits into
mainfrom
feat/4413-cics-send-control-receive
Oct 6, 2026
Merged

squid-protocol merged 9 commits into
mainfrom
feat/4413-cics-send-control-receive

Conversation

@squid-protocol

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

Copy link
Copy Markdown
Owner

Closes #4413.

What

The det translator used to refuse EXEC CICS SEND CONTROL (16 programs) and plain terminal EXEC CICS RECEIVE (9 programs) as "not modelled". Both now translate onto the CICS runtime, and the stub runtime models them the same way.

  • SEND CONTROL: ERASE / ERASEAUP / FREEKB / ALARM / FRSET, plus CURSOR(n). It runs as CicsTask.sendControl and records a SEND-CONTROL event with the options and the cursor offset. Everything else is refused by name: PRINT, FORMFEED, partitions, LDC, ACCUM/PAGING/SET, and a bare CURSOR.
  • RECEIVE: INTO / SET(ADDRESS OF linkage-01) / LENGTH / FLENGTH / MAXLENGTH / MAXFLENGTH / NOTRUNCATE. It runs as CicsTask.receive(max, notruncate):
    • LENGERR truncates the data and sets LENGTH to the original length.
    • NOTRUNCATE keeps the rest of the data for the task's next RECEIVE.
    • EOC is raised on an LUTYPE2 terminal.
    • Refused: SET without MAXLENGTH (undocumented), ASIS, and BUFFER.
  • EOC default action: the port's condition() now ignores EOC (DetCics.ignoredByDefault), per IBM's "Default action: ignore the condition". The design is extensible for det translator: HANDLE AID and IGNORE CONDITION are refused #4414's IGNORE CONDITION.
  • Harness: the stub gains GGCSCTL, a NOTRUNCATE/EOC-aware GGCRECT, and GGCRECS for RECEIVE SET. Stub EOC is ignored ahead of ERROR, because IBM says ERROR takes only conditions whose default action is to abend. The crucible runner reads the case terminal's TYPETERM DEVICE from the CSD and records SEND-CONTROL events.
  • Imports: a det CICS port no longer imports packages (dto.screen / dto.contract / repository.vsam) that the generated project lacks. javac rejected those imports for terminal-only estates.
  • Docs: register entry X15 in oracle_assumptions.md, and a finding in det_port_design.md.

Proof

These were run against the new cics-crucible cases in squid-protocol/cics-crucible#3 (draft). Their logs are hand-written from IBM's RECEIVE (3270 logical), RECEIVE (LUTYPE2/LUTYPE3) and SEND CONTROL pages.

case cobol-stub det port (java-ported)
hc-terminal-receive: 7 scenarios covering LENGERR by RESP, by HANDLE CONDITION and by default (AEIV), NOTRUNCATE pieces, SET, and SEND CONTROL CURSOR 7/7 7/7
hc-terminal-eoc: 3 scenarios covering EOC by RESP, by HANDLE CONDITION, and ignored by default 3/3 3/3

No regression:

  • cics_crucible.py --ci on the pinned v0.2.0 passes the ratchet. All 44 cobol-stub, java-ported and java-facade cells pass, so the committed ports that use receiveText still prove.
  • The det sweep (proof_sweep --det-only --skip-db2) matches the baseline.

The det port also translates the existing crucible program CAXA with no holes now. Three of its four scenarios pass. The fourth fails on an unrelated COMP-5 bug, filed as #4501.

Not in this PR

🤖 Generated with Claude Code

squid-protocol and others added 2 commits October 5, 2026 16:25
SEND CONTROL (ERASE/ERASEAUP/FREEKB/ALARM/CURSOR(n)/FRSET) records a
SEND-CONTROL event; RECEIVE INTO/SET(ADDRESS OF)/LENGTH/FLENGTH/MAXLENGTH/
MAXFLENGTH/NOTRUNCATE runs on CicsTask.receive with LENGERR and EOC (an
LUTYPE2 terminal), EOC ignored by default.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ble plumbing (#4413)

Stub: GGCSCTL, GGCRECT with NOTRUNCATE and EOC (GGCICS_LU2), GGCRECS for
RECEIVE SET(ADDRESS OF); EOC ignored by default ahead of ERROR. Runner:
SEND-CONTROL events (options, cursor), the case terminal's TYPETERM DEVICE
from the CSD (LUTYPE2: EOC). det: no import of packages the generated
project lacks. Register X15; design-doc finding.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

…helper (lint, dead-key audit) (#4413)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@squid-protocol squid-protocol changed the title WIP: det: SEND CONTROL and terminal RECEIVE (#4413) det: SEND CONTROL and terminal RECEIVE (INTO/SET/LENGTH/MAXLENGTH/NOTRUNCATE, LENGERR, EOC) (#4413) Oct 5, 2026
@squid-protocol squid-protocol added bug Unintended behavior or logic failure in the engine legacy-modernization COBOL refractor, dead-code extraction, and JCL forging priority: high Core feature broken, but workarounds exist labels Oct 5, 2026
@squid-protocol squid-protocol added enhancement New feature, sensor, or structural signature and removed bug Unintended behavior or logic failure in the engine labels Oct 5, 2026
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 priority: high Core feature broken, but workarounds exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

det translator: SEND CONTROL and plain RECEIVE (non-MAP terminal I/O) are refused

2 participants