Skip to content

CICS: GET CONTAINER BYTEOFFSET and PUT CONTAINER PREPEND, BIT only (Part of #5005) - #5285

Merged
squid-protocol merged 4 commits into
mainfrom
churn/5005-20261016T1725Z
Oct 16, 2026
Merged

squid-protocol merged 4 commits into
mainfrom
churn/5005-20261016T1725Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #5005 (siblings of #4951: CICS channel and container commands). Models GET CONTAINER BYTEOFFSET and PUT CONTAINER PREPEND (BIT containers only) in both runtimes.

What changed

  • Spec (standards/cics/commands/containers.py): BYTEOFFSET and PREPEND are options now (were refused); LENGERR RESP2 12 outcome; option groups for the combinations refused by name.
  • CicsTask (transaction_forge): getContainerAt and putContainer(.., prepend). Stub (ggcics.c): GGCGETC BYTEOFFSET (offset in GG-NUM, flag BYTEOFFSET) and GGCPUTC PREPEND (flag).
  • Translator (det/cics.py) and harness (tests/tools/equivalence_cics.py, one hunk in _container_command: avoid conflicts with equivalence: cases for the 16 CICS programs that have none (6 estates) #5076, which also edits that file).
  • Register X17 updated (IBM sentences quoted; ASSUMED and REFUSED items named). cics-crucible baseline: ca-container-byteoffset/{read,past-end}/cobol-stub unsupported -> pass; coverage.json and the rendered crucible page moved with them.

Design

Offset below 0 is 0; returned length is container length - offset; FLENGTH is set to it; offset >= length is LENGERR RESP2 12 (FLENGTH and INTO left alone: ASSUMED). PREPEND on a new container is the data alone.
Refused by name: BYTEOFFSET / PREPEND on a CHAR container (IBM counts the offset in the requested code page); PREPEND with CHAR / FROMCCSID; FLENGTH below the data left from the offset (LENGERR 11, and what FLENGTH then holds is not said); BYTEOFFSET with NODATA, SET, INTOCCSID, CONVERTST, CCSID(area); PREPEND with APPEND.

Class table (X17 partial/positional container options)

Member Status
GET BYTEOFFSET (BIT) handled, both runtimes, crucible cobol-stub passes
PUT PREPEND (BIT, new / empty / existing) handled
LENGERR RESP2 12 handled
BYTEOFFSET / PREPEND on CHAR; FLENGTH-short with offset; NODATA/SET/CCSID combos; PREPEND+APPEND refused by name, tested on both runtimes / translator / harness

Tests

tests/cics_crucible/test_container_byteoffset_5005.py (stub and CicsTask line for line: offsets -2^31..2^31-1, FLENGTH exact, empty container, 8 refusals on each runtime); translator and harness tests in test_det_translate.py, test_equivalence_cics.py.

Gates: pr_gates --fast 6/6, --ratchets 8/8 (none skipped); tests/cobol_mainframe, tests/cics_crucible, test_cics_spec 5441 passed. Golden masters not touched (no parsing change).

Cross-repo: none; cics-crucible stays at v0.8.0 (the case already exists there). det_port.py check lists every port as CHANGED only because CicsTask.java (embedded in each) gained 51 lines; the ports ratchet passes, so I did not re-prove all 103.

Lessons for agents

  • cics_crucible.py --update-baseline refuses --cases; it needs the full run (~2 min) and also rewrites coverage.json and docs/language_status/cics_crucible.md (commit both).
  • A CicsTask change makes det_port.py check list ~103 ports "CHANGED" (the runtime is embedded in each); the ports ratchet is the real judge.

🤖 Generated with Claude Code

@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Oct 16, 2026
@squid-protocol

Copy link
Copy Markdown
Owner Author

No description provided.

@squid-protocol
squid-protocol marked this pull request as ready for review October 16, 2026 20:07
@squid-protocol
squid-protocol enabled auto-merge (squash) October 16, 2026 20:08
Comment on lines +193 to +194
"java.util.function.Function<byte[], String> hex = d -> { StringBuilder b = new StringBuilder(); "
'for (byte x : d) b.append(String.format("%02X", x & 0xFF)); return b.toString(); };',
Comment on lines +1225 to +1226
assert out == ["CicsTask.ContainerResult cont1 = task.getContainerAt(CH.strip(), CN.strip(), "
"DetCics.containerLimit(f_AREA, INT(FL)), INT(OFF));",
@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.

2 participants