Skip to content

CICS: READQ TD / DELETEQ TD on an intrapartition queue (Part of #5079) - #5167

Merged
squid-protocol merged 1 commit into
mainfrom
churn/5079-20261014T2331Z
Oct 15, 2026
Merged

squid-protocol merged 1 commit into
mainfrom
churn/5079-20261014T2331Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5079 (the TD queue slice: READQ TD / DELETEQ TD). Register X57.

Design

An intrapartition transient-data queue is a first-in first-out list in the run: WRITEQ TD to a defined intrapartition queue appends its record (its event is unchanged: queue, text, resp), READQ TD removes the first, DELETEQ TD empties the queue. The queue's TYPE comes from the case's CSD (tdqueues.cfg gains a TYPE column, CicsTask.withTdQueueTypes); with no CSD every queue is defined and intrapartition. IBM pages fetched this session: READQ TD (summary-readq-td) and DELETEQ TD (summary-deleteq-td); the oracle is GnuCOBOL plus our stub, not z/OS.

Class: TD queue commands

Member Status
WRITEQ TD handled (now also queues the record; event shape unchanged)
READQ TD INTO [LENGTH] on an intrapartition queue this PR: QZERO, QIDERR, LENGERR (longer record: truncated and lost; LENGTH 0: read and lost; negative: not read), LENGTH set to the record's length
DELETEQ TD on an intrapartition queue this PR: empties it; QIDERR
DELETEQ TD on an extrapartition queue this PR: INVREQ (IBM)
READQ TD of an extrapartition queue; a queue with a TYPE other than INTRA / EXTRA refused by name (stub and port), X57
READQ TD SET / SYSID / NOSUSPEND; DELETEQ TD SYSID refused by name (spec refused)
a record moved past INTO refused by name (X6, as READ INTO)
READQ TD LENGTH(literal / LENGTH OF) handled (the most INTO takes; set nowhere)

Evidence (levels, not "proven")

  • Translated: READQ TD / DELETEQ TD whole in the harness and the det port, 0 holes on the new e2e program; 98 of 112 det ports' runtime files changed (DetCics.java +12 lines, CicsTask.java +85, no generated service code moved), none of their translations.
  • Executed-equivalent: tests/cobol_mainframe/test_td_queue_e2e_5079.py (EQUIVALENCE_E2E=1: GnuCOBOL + stub vs the det port under CicsTask, 1 scenario, 9 hand-traced SEND TEXT lines, 6 READQ-TD events, 3 WRITEQ-TD events, 0 diffs). tests/cics_crucible/test_td_queue_5079.py: one 33-operation list on the stub and on CicsTask (QZERO / FIFO / destructive / LENGTH shorter, 0, negative / delete / QIDERR / INVREQ / empty record / cross-process persistence / events), plus both runtimes' refusals.
  • Re-proved the 98 moved det ports (det_port.py run): 93 PROVED; 5 not proved (cbsa-bnk1ccs, -bnk1tfn, -bnk1uac, cbsa-crecust DIFFERS; zecs-zecs003 JAVA FAILED), the same 5 with the same results on a clean origin/main.
  • Not measured: paragraph / branch % of the new program (synthetic), z/OS behaviour.
  • Assumptions relied on (X57): a queue is empty before the task writes; a WRITEQ TD is committed at once (no logical recoverability, no SYNCPOINT ROLLBACK undo); a 0-length WRITEQ TD queues an empty record.

Gates

pr_gates --fast: 6/6 pass. pr_gates --ratchets: 6 pass; port-surface failed once in the full run (/tmp/gitgalaxy-port-surface messages about generator surfaces for carddemo services this PR does not touch) and passed on rerun alone (--only-ratchets port-surface --vs-main). No golden master moves expected (no scan-time code touched); crucible_check not run. Tests also run: tests/cics_crucible, test_equivalence_cics, test_det_translate, test_cics_resources, test_messaging, test_cics_spec, test_cobolrt_rules (1194 passed, 5 skipped).

Test changes

test_equivalence_cics.py lines ~381 / 422: the refusal examples now use READQ TD ... SET(P) (READQ TD INTO is modelled). test_cics_spec.py: 94 modelled / 159 refused. New RT-CICS-READQ-TD-INTO in cobolrt_rules.json.

Sibling gaps (not in this PR)

  • READQ TD SET (pointer lane): refused.
  • Extrapartition input queues (READQ, open / closed state, NOTOPEN / IOERR / ENDFILE): refused by name.
  • NOSUSPEND / QBUSY, TRIGGERLEVEL and automatic task initiation, logical recoverability and SYNCPOINT ROLLBACK of TD, remote SYSID queues, INDIRECT / REMOTE queue types: refused or unmodelled.
  • cobol_to_java_messaging_forge.py has its own TD runtime (READQ TD, line ~613) with separate semantics to compare against X57.
  • Seeding a queue's records before a conversation (case syntax).

Cross-repo

None: no companion PR, no crucible pin bump.

Lessons for agents

  • det_port.py check lists ~98 CICS ports as CHANGED for any CicsTask / DetCics method addition (runtime lines only); re-prove them with heavy-run.sh det_port.py run --jobs 4 <ports> (~35 min) and compare any failure to a clean origin/main worktree before blaming the change (5 ports fail there already).
  • pr_gates --ratchets port-surface can fail in a full run and pass alone: rerun it with --only-ratchets port-surface before chasing it.

🤖 Generated with Claude Code

…5079)

An intrapartition transient-data queue is a first-in first-out list the task's own WRITEQ TDs fill: READQ TD is a
destructive read (QZERO empty, QIDERR undefined, LENGERR for a record longer than LENGTH or LENGTH 0/negative, LENGTH set
to the record's length), DELETEQ TD empties it (INVREQ for an extrapartition queue). Extrapartition READQ, SET, SYSID and
NOSUSPEND are refused by name. Register X57; the WRITEQ TD event shape is unchanged.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 15, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol enabled auto-merge (squash) October 15, 2026 00:48
@github-actions

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

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant