Repository navigation
Description
Found while sizing what keeps the six burned CICS estates' programs from translating whole. Owner decision 2026-10-18: model ALTER (until now an agreed refusal: definition_of_done.md refusal families, "COBOL features the det port does not model (... ALTER, ENTRY)", and det_port_design.md "Out of scope for this translator").
Program: CardDemo app/cbl/CBSTM03A.CBL (evidence L0, 415 of 424 statements translate, 9 holes). It is the only program in the six burned estates that uses ALTER (census: grep -E 'ALTER\s+\S+\s+TO' over .mainframe_corpora/{carddemo,cbsa,genapp,zecs,dbb-mortgage-application,cics-async-api-credit-card-application-example}).
0000-START. *> l.297
EVALUATE WS-FL-DD
WHEN 'TRNXFILE'
ALTER 8100-FILE-OPEN TO PROCEED TO 8100-TRNXFILE-OPEN
GO TO 8100-FILE-OPEN
WHEN 'XREFFILE'
ALTER 8100-FILE-OPEN TO PROCEED TO 8200-XREFFILE-OPEN
GO TO 8100-FILE-OPEN
... (CUSTFILE -> 8300-, ACCTFILE -> 8400-)
8100-FILE-OPEN. *> l.~724: one sentence, one GO TO
GO TO 8100-TRNXFILE-OPEN
.What IBM does (Enterprise COBOL for z/OS Language Reference, ALTER statement; ALTER is an obsolete element but supported): ALTER changes the transfer point of the GO TO in paragraph-name-1, which must contain only one sentence, a GO TO without DEPENDING. The change lasts until the next ALTER of that paragraph; in an independent segment the altered GO TO returns to its initial state each time the segment is entered. (Filer: quote the page numbers from the 6.4 Language Reference into register when landing.)
What the det translator does: ALTER is a statement word (det/stmt.py:1139) with no parser, so it becomes the generic hole ALTER not modelled (det/stmt.py:660). det/program.py:253 (structurable) already treats an ALTER hole as unstructured, so the program goes through the paragraph dispatcher (return GOTO | n, det/gen.py:1957). That dispatcher is the mechanism: an altered paragraph's GO TO reads a per-paragraph target slot (initialised to the GO TO's written target), and ALTER writes the slot.
Class: ALTER and the altered GO TO
| member | status | evidence |
|---|---|---|
ALTER p TO [PROCEED TO] q, p's only sentence a GO TO r |
missing (hole) | CBSTM03A l.300, 303, 306, 309 |
| several ALTERs of one paragraph, last one wins | missing | CBSTM03A (4 targets for 8100-FILE-OPEN) |
GO TO p / fall-through / PERFORM p into an altered paragraph |
missing | CBSTM03A l.301 ff. (GO TO); PERFORM and fall-through: same slot |
one ALTER statement naming several p TO q pairs |
missing | no burned use; same mechanism |
altered GO TO with no operand (p. GO TO., target only via ALTER) |
missing | no burned use (epscsmrd's bare GO TO lines continue to a DEPENDING list, not this form); same mechanism, or refuse by name if the oracle rejects it |
| ALTER of a paragraph in an independent segment (section priority >= 50 / SEGMENT-LIMIT): reset on segment entry | out of scope | no burned use; refuse by name |
| ALTER of a paragraph whose sentence is not a lone GO TO (or GO TO DEPENDING) | refuse by name | IBM: not allowed; the oracle's compile error is the reference |
Acceptance
- Parse ALTER into a statement (all pairs), model it through the dispatcher slot; the members marked missing translate, the others are refused by name.
-
tests/cobol_mainframe/test_det_programs.py: an ALTER fixture (likeGOTOOUT) with several ALTERs of one paragraph, reached by GO TO, PERFORM and fall-through, equal to the GnuCOBOL oracle (-std=ibm). - CBSTM03A: the 4 ALTER holes are gone (holes 9 -> 5) in its evidence report;
det_survey/compare --before-baselinequoted in the PR. - Docs: drop ALTER from the refusal lists in
docs/language_status/definition_of_done.md(refusal families) anddet_port_design.md("Out of scope for this translator");refusal_map.jsonentryalter-> this issue (or removed once no report carries the hole); a register entry with IBM's text.
Not in this issue (so CBSTM03A stays below L1 after it)
The other 5 holes are SET ADDRESS OF (pointers) at l.266-284: the program walks z/OS system control blocks (PSA -> TCB +536 -> TIOT, bumping a POINTER REDEFINES to read the DD names). That is pointer arithmetic over system storage, still out of scope (det_port_design.md); #5042 is the CICS task-storage pointer lane and does not cover it. CBSTM03A reaches L1 only if the owner also decides how to treat that prologue.
Siblings: #5042 (pointer lane)
Activity
squid-protocol commentedon Oct 19, 2026
Claimed by promoter-bot host
melek, lease renewed 2026-10-19T06:51Z. It lapses after 6 h without a renewal. To take it back, assign someone or remove theclaim:meleklabel.det: model ALTER and the altered GO TO through the paragraph dispatch…
docs: ALTER is modelled -- drop it from the refusal families, own the…
squid-protocol commentedon Oct 19, 2026
Done: #5568 (parser + dispatcher slot model, oracle fixture, CBSTM03A holes 9 -> 5, remaining 5 are SET ADDRESS OF, out of scope as noted) and #5580 (docs, refusal map, register C19). Acceptance met.