Skip to content

Fix #4008: CICS harness models XCTL RESP/RESP2 and LENGTH - #4020

Merged
squid-protocol merged 3 commits into
mainfrom
fix/4008-xctl-resp
Sep 29, 2026
Merged

squid-protocol merged 3 commits into
mainfrom
fix/4008-xctl-resp

Conversation

@squid-protocol

@squid-protocol squid-protocol commented Sep 29, 2026 •

Copy link
Copy Markdown
Owner

Fixes #4008
Part of #3989 (phase 3, lane B)

#4016, #4018 and #4019 have merged, and so has lane A's #4001 (BMS output fidelity). This branch is rebased on main, and its baseline and report are regenerated. After the #4009 merge, EIBCALEN on the Java side is #4009's eibcalen(), and the XCTL COMMAREA carries its LENGTH.

What

A failed XCTL (IBM, EXEC CICS XCTL):

Copy semantics: a successful XCTL copies LENGTH bytes from the named item, past the item's end when LENGTH is longer. In long-overread, 80 bytes are taken from the 10-byte WS-V1.

Events:

  • The stub's XCTL line now carries area / resp / resp2.
  • The runner reports RESP2 only when the command is not NORMAL (SPEC 6.2, "where IBM documents the value").

Java (generated CicsTask):

  • xctl(program, commarea, Integer length) returns the condition. The event records LENGTH, RESP and RESP2.
  • A failed XCTL does not end the program.
  • xctl(program, commarea) stands for a whole-record COMMAREA: its LENGTH is null, and the Java comparison treats that as unmodelled.
  • test_cics_endpoints is updated for the String return type.

Cells (side × status)

side before pass/fail/unsupported after
engine-facts 10 / 0 / 0 10 / 0 / 0
forge-compile 10 / 0 / 0 10 / 0 / 0
cobol-stub 33 / 1 / 3 34 / 0 / 3
java 0 / 37 / 0 0 / 37 / 0
  • ca-xctl-versions/length-range now passes (XCTL LENGTH(32767): LENGERR RESP2 11, then XCTL FAILED RESP=22 RESP2=11), so all three ca-xctl-versions scenarios pass.
  • The remaining 3 unsupported cobol-stub cells are pc-aid-menu, which waits for HANDLE AID (CICS harness: HANDLE AID (unlocks pc-aid-menu) #4007).

Tests

  • Stub, compiled with cc: LENGERR 11, PGMIDERR 1, and an 80-byte copy from a shorter item.
  • CicsTask under javac: a failed XCTL leaves the program running, and a successful one runs the target with EIBCALEN = LENGTH.
  • Translator: unit test for the XCTL translation.
  • Runner: the XCTL event with RESP2.
  • End to end: the EQUIVALENCE_E2E=1 fixture passes, and CardDemo account view (whose XCTL has no CSD there, so every program counts as defined) passes 9/9 events.

Audits: ruff, mypy and dead-key show no new findings. Touched files are formatted.

🤖 Generated with Claude Code

@squid-protocol
squid-protocol force-pushed the fix/4008-xctl-resp branch 2 times, most recently from a303edc to 78519d9 Compare September 29, 2026 19:39
@github-actions

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 September 29, 2026 20:05
squid-protocol and others added 3 commits September 29, 2026 16:25
- Stub: XCTL fails with LENGERR RESP2 11 for a LENGTH outside 0-32763 and
  PGMIDERR RESP2 1 for a program the CSD does not define; nothing is then
  transferred. A successful XCTL copies LENGTH bytes from the named item,
  past its end if need be.
- Translator: after GGCXCTL the program GOBACKs only on NORMAL; a failure
  goes through the condition handling (RESP, HANDLE CONDITION, default).
- Runner: the XCTL event carries RESP2 where the command is not NORMAL.
- CicsTask: xctl(program, commarea, length) returns the condition and
  records LENGTH, RESP and RESP2; a failed XCTL does not end the program.

cobol-stub: ca-xctl-versions/length-range now passes (all 3 pass).

Part of #3989.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01EC8FWfn3aPmsUPnRgKNVup
@squid-protocol
squid-protocol merged commit 63f9825 into main Sep 29, 2026
38 checks passed
@squid-protocol
squid-protocol deleted the fix/4008-xctl-resp branch September 29, 2026 20:42
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.

CICS harness: XCTL RESP/RESP2 and LENGTH semantics

1 participant