Repository navigation
det: TS items in the region's code page; DTO copybooks in their declared page (#4528) - #4533
Merged
Merged
Conversation
…red page (#4528) WRITEQ / READQ TS move each byte between the port's storage page (CS) and the region's (REGION: the estate's declared EBCDIC page, else CCSID 037; gitgalaxy.cics.charset overrides), as the COBOL side's region does. NL/LF follow CDRA / Python cp037, not the JDK's LF-for-both; a byte one page cannot carry is refused by name. Cics.declared reads a DTO copybook with the estate's declared page instead of Latin-1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W3KVtYHQp8KsfKcHsdiPbR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W3KVtYHQp8KsfKcHsdiPbR
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W3KVtYHQp8KsfKcHsdiPbR
3 tasks
| try: | ||
| if " ".encode(declared) == b"\x40": | ||
| page = declared | ||
| except (LookupError, UnicodeError): |
Contributor
squid-protocol
marked this pull request as ready for review
October 6, 2026 05:22
squid-protocol
added a commit
that referenced
this pull request
Oct 6, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W3KVtYHQp8KsfKcHsdiPbR # Conflicts: # docs/language_status/det_port_design.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #4528
What was wrong
A TS item is "the bytes the program wrote, in the region's code page" (CicsTask). The COBOL side's region keeps it in CCSID 037 (cics-crucible SPEC 2, and the stub transcodes its Latin-1 storage at the boundary). The det port gave CicsTask its storage's bytes (CS,
CobolRecords.charset()) unchanged. SoWS-ONE VALUE 'W'reached the queue as X'57' (ï), and an itemAcame back asÁ. Separately,Cics.declaredread DTO copybooks as Latin-1.Change
det/cics.py: WRITEQ / READQ TS (and REWRITE) now go throughDetCics.toRegion(.., CS, REGION)andDetCics.fromRegion(.., REGION, CS).region_page()returns the estate's declared code page for the program (EngineCopies.page, det translator: 32 programs refused across the keyed corpora and estate-crucible (code pages, free format, multi-program sources, grammar gaps); KYUYJP crashes #4462) when it is an EBCDIC page. Otherwise it is CCSID 037: an ASCII-family declaration only says how the source was transferred. At run time the system propertygitgalaxy.cics.charsetcan name another page, as withCobolRecords.charset().DetCics.java: a strict per-byte transcode. A byte that is not one character in both pages stops the run by name. No?is ever substituted. NL/LF follow CDRA and Python's cp037 (X'15' is NEL, X'25' is LF), not the JDK's IBM037, which maps both to LF and encodes LF as X'15'. The test checks all 256 bytes against Python's cp037 table.Cics.declared: reads the DTO copybook with_raw_lines(path, engine), the same reader the program source goes through.Gen.enginecarries the EngineCopies.Cobol.text(.., CS)), SEND TEXT, terminal RECEIVE and the COMMAREA DTO codecs. They already convert through characters.Evidence
CICS_CRUCIBLE_ALLOW_UNPINNED=1, no tag or pin bump). 10 cells newly pass and none regress:length-trapbyte for byte (it was 0/4).cics_crucible --ci(pinned v0.2.0): rc 0, 152 pass / 44 fail, the same as the baseline, before and after merging COBOL engine: a group's USAGE applies to its elementary items (#4525) #4531 and CICS facades: answer the own COMMAREA DTO where returned() converts by layout without loss (#4449 part 2) #4529.proof_sweep --det-only --skip-db2): "as expected", rc 0.pr_gates: 7/7 pass. After the CICS facades: answer the own COMMAREA DTO where returned() converts by layout without loss (#4449 part 2) #4529 merge,--fastpasses 5/5.pr_gates --ratchetspasses 5/5 both before and after the merges.test_det_translate.py: the emitted TS code, region page selection, a cp037 DTO copybook, and a javac test of DetCics (round trip, NEL/LF, strict refusals, property override). They ran with thetranslatorextra and the JDK, and nothing was skipped.Not in this PR
hc-abend-link/sub-unhandledon the det port now gets further and fails on a different gap. The trail bytesthat HCSUB writes into the caller's COMMAREA before its unhandled abend is not written back, becausecaBackruns only on a normal return. That is LINK abend write-back, not a charset problem.🤖 Generated with Claude Code
https://claude.ai/code/session_01W3KVtYHQp8KsfKcHsdiPbR