Repository navigation
CICS programs read their COMMAREA in segments: model the unpack, count data-driven callers (#3655) - #3670
Merged
Conversation
…t data-driven callers (#3655) CardDemo's screens are entered with the shared 160-byte CARDDEMO-COMMAREA from the menu, and on re-entry with that record plus their own state. They read both from an opaque DFHCOMMAREA (PIC X OCCURS ... DEPENDING ON EIBCALEN): MOVE DFHCOMMAREA (1:LENGTH OF CARDDEMO-COMMAREA) TO CARDDEMO-COMMAREA MOVE DFHCOMMAREA (LENGTH OF CARDDEMO-COMMAREA + 1: LENGTH OF WS-THIS-PROGCOMMAREA) TO WS-THIS-PROGCOMMAREA Engine: - core/data_moves keeps each reference modification as written (source_refmod_text / target_refmod_text); the flags are unchanged; - new data_move_data columns, healed into existing DBs; - the rehydrator and galaxy_ir read them, and an older DB loads them as None. IR: - program_interfaces().commarea_unpack evaluates those MOVEs (integers, LENGTH OF item, + / -; EIBCALEN = the receiving record's width) into offset-ordered segments; - when they tile an OPAQUE area, that is the COMMAREA layout (basis "unpack"), ahead of the caller-record and own-DFHCOMMAREA rules; - a declared DFHCOMMAREA is read through its fields, and a move into a PIC X(n) is a copy. That rule is GENAPP's case: it dumps DFHCOMMAREA(1:EIBCALEN) into an error message. - `inbound` lists every site that can enter a program, data-driven XCTLs included, with the record each passes. Forge: - an unpacked COMMAREA of two or more records becomes a composite DTO (one field per segment DTO) with fromPrefix(first); - a caller that passes only the leading record, such as CardDemo's menu through its data-driven XCTL, builds the callee's COMMAREA with fromPrefix instead of carrying a mapping TODO. Results: - CardDemo: 20 programs read by unpack (e.g. COACTUPC = CARDDEMO-COMMAREA 160 + WS-THIS-PROGCOMMAREA 873), and "passes X, receives Y" mapping TODOs go from 20 to 0; - GENAPP: unchanged (declared COMMAREA); CBSA: 1 opaque unpack (BNK1CCS); - 6 corpora x 13 configs compile via --scan; - ir_join_diff: only program_interfaces (and programs, whose data moves gained the texts) change; - refraction snapshot 0 differ; full suite 11,647 passed; ruff / mypy / dead-key / X-Ray clean. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
Contributor
squid-protocol
added a commit
that referenced
this pull request
Sep 25, 2026
The Java repository forge (#3617) maps each CICS FILE command's RIDFLD onto an entity key, and no key compared it. New field `CICS RIDFLD`: `L<line> VERB FILE NAME RIDFLD=OPERAND` per FILE command with a RIDFLD, spacing normalized. - Key: this tool's own EXEC CICS reader (cics_resource_ops now keeps the option), over COBOL, PL/I and assembler sources. - Engine: cics_resource_data.attributes, nested parentheses included. It is a section of its own, so the reviewed `CICS resources` units are untouched. Key and engine agree on all 781 units: CardDemo 46, CBSA 17, GENAPP 7, zECS 22, DSF 689 (PL/I). The field enters at tier draft, with development_rounds 6. Ledger update: +0 -0, 0 untriaged; check clean. Part 2 (the reference-modification texts) needs #3670's engine columns. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g
squid-protocol
added a commit
that referenced
this pull request
Sep 25, 2026
…lds (#3602, #3649 part 1) (#3672) * Answer key: copybook record layouts, a new ledger field (#3602) The layouts the Java generators depend on mostly live in copybooks, which no key checked. New field `copybook layouts`: - Key: draft_copybook_layouts lays out every COBOL copybook with this tool's own reader and storage arithmetic, as `ROOT/NAME @offset+bytes` per elementary PIC item. - Engine: GalaxyIR.record_layout per root. - The contract is the engine's: a REDEFINES overlay is skipped; items without a PIC take their storage but are not units; an OCCURS item is listed once; an item under a PIC item is not storage. - A copybook that COPYs another member is not keyed (this reader does not expand COPY). Three key-reader errors, found against the corpora and fixed to COBOL's rules: - `1 THROUGH 12.` continuing an 88's VALUES was read as a level-1 item named THROUGH (CardDemo CSUTLDWY); - a POINTER took 0 bytes and shifted every later field (CBSA PROCISRT); POINTER / INDEX / COMP-1 are 4, COMP-2 8; - an item under an elementary PIC item was laid out (GENAPP soaipm1). _pic_bytes also counts CR / DB (2), E, and national N / G (2 each). Result: key and engine agree on all 2,759 units in 113 copybooks (CardDemo 2,131, CBSA 389, GENAPP 188, zOE 34, zECS 17; DSF has no COBOL copybooks). The ledger adds the field at tier draft (update: +0 -0, 0 untriaged; check clean). The field-testing registry marks it development_rounds 6: it was built against every keyed estate, so it stays `untested` until fresh estates or a census. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g * Field testing: copybook layouts introduced by #3672 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g * Answer key: the CICS RIDFLD operand, a new ledger field (#3649, part 1) The Java repository forge (#3617) maps each CICS FILE command's RIDFLD onto an entity key, and no key compared it. New field `CICS RIDFLD`: `L<line> VERB FILE NAME RIDFLD=OPERAND` per FILE command with a RIDFLD, spacing normalized. - Key: this tool's own EXEC CICS reader (cics_resource_ops now keeps the option), over COBOL, PL/I and assembler sources. - Engine: cics_resource_data.attributes, nested parentheses included. It is a section of its own, so the reviewed `CICS resources` units are untouched. Key and engine agree on all 781 units: CardDemo 46, CBSA 17, GENAPP 7, zECS 22, DSF 689 (PL/I). The field enters at tier draft, with development_rounds 6. Ledger update: +0 -0, 0 untriaged; check clean. Part 2 (the reference-modification texts) needs #3670's engine columns. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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 #3655 (epic #3625).
The contract, as the program itself reads it
CardDemo's screens are entered with the shared 160-byte
CARDDEMO-COMMAREAfrom the menu, and on re-entry with that record plus their own state. They read both from an opaque DFHCOMMAREA (PIC X OCCURS 1 TO 32767 DEPENDING ON EIBCALEN) by reference modification:The #3615 layout rule only saw the self
RETURN TRANSID(2000-byteWS-COMMAREA), so every menu entry carried// TODO: this site passes CARDDEMO-COMMAREA; COACTUPC receives WS-COMMAREA.Changes
core/data_moves)source_refmod_text/target_refmod_text(the flags are unchanged)data_move_datacolumns, healed into existing DBs by_ensure_columns; the rehydrator andgalaxy_irread them, and a pre-#3655 DB loads them asNoneprogram_interfaces().commarea_unpack: the program's ownMOVE DFHCOMMAREA(start:length) TO record, evaluated (integers,LENGTH OF item,+/-;EIBCALEN= the receiving record's width) into offset-ordered segments. When they tile an opaque area, that is the COMMAREA (basis: unpack), ahead of the older rules.inbound: every site that can enter the program, data-driven XCTLs included, with the record each passesfromPrefix(first); a caller passing only the leading record callshandleLink(X.fromPrefix(...))and in the menu's dispatch:
case "COACTUPC": return coactupcService.getObject().handleLink(CoactupcCommarea.fromPrefix((CarddemoCommarea) request));Not guessing: the GENAPP trap
The first cut also "found" unpacks in all 20 GENAPP programs. They were
MOVE DFHCOMMAREA(1:EIBCALEN) TO CA-DATA, whereCA-DATA PIC X(90)sits inside an error message: a diagnostic dump. Two rules now exclude it:COPY LGCMAREA) is read through its own fields;PIC X(n)is a copy.Both rules are pinned by a test (
ERRDUMP).Results
Attributes consumed (consumer audit)
data moves, field-tested)MOVE WS-THIS-PROGCOMMAREA TO WS-COMMAREA(LENGTH OF CARDDEMO-COMMAREA + 1:...)) uses the same offsets. Add it to #3649's key workLENGTH OFinboundVerified
ir_join_diff.py, from Tool: ir_join_diff.py -- blast radius of an engine change across every GalaxyIR join on the pinned corpora #3653): across all 6 corpora onlyprogram_interfaceschanges, plusprograms, whose data-move rows gained the two texts.data_flows/commarea_contracts/navigationare unchanged.--scan.refraction_snapshot.py check: 0 differ.test_commarea_unpack.py, a real scan): refmod text extraction, segments + inbound, the GENAPP trap, the length-expression reader, a pre-Java conversion: CICS programs have several inbound COMMAREAs (first entry vs re-entry); count data-driven callers and model prefix layouts #3655 DB, and the Java (composite DTO +fromPrefixin the dispatch).🤖 Generated with Claude Code
https://claude.ai/code/session_017ZsVaAkb86P5r5JXDC2Y9g