Skip to content

Fix #4002: CICS harness models TS queues (READQ / WRITEQ TS) - #4015

Merged
squid-protocol merged 1 commit into
mainfrom
fix/4002-ts-queues
Sep 29, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
fix/4002-ts-queues

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

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

What

Temporary storage in the CICS harness: READQ TS and WRITEQ TS with ITEM, NEXT, in/out LENGTH, ITEMERR, QIDERR and LENGERR. Each scenario is seeded from initial and reports its final queues, on both sides.

  • Translator (equivalence_cics.py): READQ / WRITEQ [TS] becomes GGCREADQ / GGCWRTQ. TS is the default, so READQ QUEUE(..) counts as TS.
    • READQ LENGTH is in-out. It is moved back only on NORMAL and LENGERR, because IBM documents it for neither ITEMERR nor QIDERR.
    • ITEM and NEXT: ITEM(n) takes a value, and NEXT is passed as item 0.
    • WRITEQ's ITEM is returned on NORMAL. Under REWRITE it is an input instead.
    • NUMITEMS is set on NORMAL.
    • SET, SYSID and REWRITE without ITEM are refused by name.
    • New GG-CICS fields (appended): GG-QNAME X(16), GG-ITEM and GG-NUM.
  • Stub (ggcics.c): a TS store per scenario, in $GGCICS_TS, with one directory per queue named by the queue name's hex. This follows IBM EXEC CICS READQ TS / WRITEQ TS:
    • READQ:
      • QIDERR when the queue is missing.
      • ITEMERR for an item outside the queue, or for NEXT past its end.
      • LENGERR truncates to LENGTH, and LENGTH is then set to the item's length: "On completion ... the data area is set to the original length of the data record".
    • WRITEQ: creates the queue on its first write and returns the item number. REWRITE replaces an item: QIDERR without the queue, ITEMERR outside it. LENGERR outside 1..32763.
    • NEXT position: the documentation does not say whether a read by ITEM moves the NEXT position. The stub counts it as a read, it says so in a comment, and no crucible case depends on it.
  • Runner:
    • seed_ts / read_ts handle the seeds and the final queues. Values are SPEC 6.1 text or hex, as EBCDIC.
    • New READQ-TS and WRITEQ-TS events. length and data are null where the command sets none, as the logs spell it.
    • Both sides' capabilities now include TS queues, so the "TS queue seeding" refusal is gone.
  • Java (generated CicsTask):
    • A shared TempStorage, with seed and queues.
    • New methods: withTempStorage, writeqTs, rewriteqTs, readqTs, readqTsNext, returning TsResult(resp, item, length, data, numItems).
    • The Java driver seeds a store per scenario, shares it between tasks and reports the final queues as hex.
  • Fixture fx-ts-queue: an end-to-end run on the stub covering terminal RECEIVE, a seeded READQ, WRITEQ returning ITEM, READQ LENGERR under RESP (LENGTH 5 into 3 bytes), QIDERR, and the final queue.

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 2 / 1 / 34 2 / 1 / 34
java 0 / 28 / 9 0 / 37 / 0

Tests

  • Translator: unit tests for ITEM, NEXT, LENGTH, NUMITEMS, REWRITE and the refusals.
  • Runner: stub log → events (LENGERR, ITEMERR with no length or data, WRITEQ failure); the seed/final round trip; the Java TS events as base64 and the final queues as hex.
  • test_cics_runtimes.py: compiles ggcics.c and drives the whole READQ/WRITEQ table. It also compiles the generated CicsTask with javac and drives the TS API.
  • End to end: the EQUIVALENCE_E2E=1 fixture run covers both fixture cases on every side. CardDemo account view still passes 9/9 events.

Generated output

CicsTask.java gains the TS API (intended). It is generated only for CICS transaction programs, and java-compile builds it. No goldens change.

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

🤖 Generated with Claude Code

- Translator: READQ / WRITEQ TS (TS is the default) become GGCREADQ /
  GGCWRTQ. READQ's LENGTH is in-out and set back on NORMAL / LENGERR only;
  ITEM or NEXT; WRITEQ's ITEM is returned (or an input under REWRITE);
  NUMITEMS on NORMAL. SET and SYSID are refused by name.
- Stub: a TS store per scenario ($GGCICS_TS), one directory per queue.
  QIDERR, ITEMERR (NEXT past the end too), LENGERR truncating with LENGTH =
  the item's length (IBM, EXEC CICS READQ TS); WRITEQ creates the queue.
- Runner: seeds each scenario's `initial` queues and reports the `final`
  ones, on both sides; READQ-TS / WRITEQ-TS events.
- CicsTask: withTempStorage / writeqTs / rewriteqTs / readqTs / readqTsNext
  and the shared TempStorage.
- Fixture fx-ts-queue: RECEIVE + TS end to end on the stub.

The TS cells' remaining blockers are conditions (#4003), LINK (#4004),
interval control (#4006) and BMS output (#4001); 9 java cells move from
unsupported to fail (the unported runTask).

Part of #3989.

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

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit e804642 into main Sep 29, 2026
38 checks passed
@squid-protocol
squid-protocol deleted the fix/4002-ts-queues branch September 29, 2026 18:07
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: TS queues READQ/WRITEQ TS (unlocks 9 cobol-stub cells)

1 participant