Repository navigation
det: DFSORT OUTREC FIELDS/BUILD lowered and proven against GnuCOBOL (Part of #4268) - #6983
Merged
Merged
Conversation
…Part of #4268) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
|
No description provided. |
Contributor
This was referenced Oct 29, 2026
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.
Part of #4268. Next slice after #6975: DFSORT
OUTREC FIELDS=/BUILD=is lowered onto the COBOL SORT program and proven byte for byte against GnuCOBOL.Forge wiring (
JclSteps.utility) was first on the handoff list but is not self-contained: no estate fact carries a step's in-stream SYSIN text (galaxy_ir.job_ddsholds DD name/dsn/disp only), so the forge cannot parse a card. It needs a SYSIN channel first (see Remaining slices). OUTREC was the first slice that stands alone.What changed
det/dfsort.py: OUTREC items (input fieldp,mor SYMNAMES field, CH/BI;nX;nZ;C'..'/X'..'; optionalo:that must be the next free byte). Applied after sort/merge and after INCLUDE/OMIT; output record length = items. Lowered through aBUILD-OUTparagraph and aW-OUTarea on every writer (SORT, COPY, MERGE, carried ZD key).tests/cobol_mainframe/test_dfsort_4268.py: parse + refusal tests; e2e cases OUTRECSORT / OUTRECCOPY / OUTRECMERGE / OUTRECZD (GnuCOBOL vs det-port Java).docs/language_status/register/F4.md: OUTREC entry, refusal list.Checklist: partial [c:336a82a2] -- SORT/MERGE verbs done earlier; the step model gained OUTREC, forge wiring remains
Checklist: partial [c:ac8b71e6] -- SORT step now covers OUTREC; IEBGENER oracle proof, IDCAMS REPRO/DEFINE and forge wiring left
Checklist: partial [c:9e003ccd] -- F4 updated for OUTREC; update again as slices land
Class / Sibling gaps
Class: DFSORT control statements and operands that a SORT step's SYSIN can carry, beyond SORT/MERGE/INCLUDE/OMIT/OPTION. Members: OUTREC (handled here, same mechanism as the writers); INREC, OUTFIL, SUM, RECORD, ALTSEQ, OPTION operands (SKIPREC, VLSHRT ...), format conversions in OUTREC (ZD/PD, edit masks), OUTREC OVERLAY/PARSE,
o:gaps: refused by name, unchanged or newly named. Which burned program needs them: CardDemo's SORT steps (TRANREPT, SORTTEST, COMBTRAN) use none of OUTREC/INREC/SUM; none needed by CBSA/GenApp/zECS/DBB/cicsdev from what the proofs reach.Sibling gaps
o:and ZD/PD conversions: IBM's fill/convert rules not verified here, refused.copyexists, not proven against an oracle), IDCAMS REPRO/DEFINE: separate utilities, no oracle run yet.Remaining slices (files, order)
galaxy_ir.py(in-stream SYSIN/SYMNAMES body per step) +skeleton_export.py+ a test.cobol_to_java_batch_forge.py(steps.utilityfor a parseable SORT step -> lowered program) +test_batch_jobs.py.Facts checked
job_ddsrow keys have no SYSIN body (readgalaxy_ir.pyjob_dds).test_dfsort_4268.pyunit tests: 24 passed (e2e skipped without EQUIVALENCE_E2E).EQUIVALENCE_E2E=1via heavy-run.sh: 34 passed (GnuCOBOL vs det-port Java, OUTREC* included).pr_gates --fast9/9 after the mypy fix (audits re-run: mypy and audit_check clear);--ratchets9 pass / 0 fail / 0 skipped; pre-PR guard tests 231 passed. Translator extra: tests ran, none skipped for tree_sitter.Lessons for agents
dfsort.py,_const()returns a decimalConst("N")for a bare number, so a token loop that tries constants first swallows apposition: testt.isdigit()first.01 X-R REDEFINES W-REC) must follow W-REC directly: declare extra 01 areas after the overlays are collected (cobc: "REDEFINES must follow the original definition").🤖 Generated with Claude Code