Repository navigation
det-port: SORT / MERGE / RELEASE / RETURN and SD files (#4268) - #4286
Merged
Merged
Conversation
The det translator had no parser for the sort verbs, so each became a hole. Now SORT (KEY phrases, WITH DUPLICATES, COLLATING SEQUENCE NATIVE / STANDARD-1, USING / GIVING, INPUT / OUTPUT PROCEDURE), MERGE (USING / GIVING / OUTPUT PROCEDURE), RELEASE [FROM], RETURN [INTO] with AT END and the SORT-RETURN register translate onto a new runtime class cobolrt/Sort (additive). What IBM leaves open is refused by name. Proof: SORTIP and SORTUG in test_det_programs.py equal GnuCOBOL's output in the bytes, typed and groups modes. Part of #4268 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013sNMtAg6s9dyyjNgnjRHi8
Contributor
…TURN dead key - _sort_io_file now returns (fd, record) with the record already checked non-None, so using_file/giving_file use a non-optional L.Item instead of fd.record (Item | None) -- fixes gen.py union-attr on `.size`. - dead_key_audit: allowlist "SORT-RETURN". Gen.items is keyed by the program's own parsed COBOL data names; the literal lookup checks whether the program declares an item that shadows the SORT-RETURN special register. No in-repo writer exists by design (walker false positive). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FNWHcUSn5p7eMxFTsB5rFo
fd_entries now records whether a file description is an SD (sort-merge file). The RECORD VARYING test compared against the old two-key dict, so full-suite failed on it; add `"sd": False` for both FDs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
squid-protocol
marked this pull request as ready for review
October 4, 2026 12:47
squid-protocol
added a commit
that referenced
this pull request
Oct 4, 2026
field_testing.json merged by entry (main's #4243 defect kept; this branch's defect renumbered where its ID collided), then cics_field_testing.md and fact_channel_confidence.json regenerated with `tests/tools/field_testing.py report --write` rather than hand-merged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
squid-protocol
added a commit
that referenced
this pull request
Oct 4, 2026
field_testing.json merged by entry (main's #4243 defect kept; this branch's defect renumbered where its ID collided), then cics_field_testing.md and fact_channel_confidence.json regenerated with `tests/tools/field_testing.py report --write` rather than hand-merged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This was referenced Oct 5, 2026
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 (the COBOL side; JCL utility steps are not covered here, so the issue stays open).
The det translator had no parser for the sort verbs, so each one became a hole. They now translate onto a new runtime class,
cobolrt/Sort(additive):fd_entriesgains ansdflag)What IBM leaves open is refused by name rather than guessed.
Proof: SORTIP and SORTUG in
tests/cobol_mainframe/test_det_programs.pymatch GnuCOBOL's output byte for byte, in typed and groups modes.Follow-ups in this PR:
_sort_io_filereturns the checked record, sogiving_fileno longer reads.sizeoff an optional.SORT-RETURNallowlisted. The literal lookup checks whether a program declares an item that shadows the special register; nothing writes that key by design.test_varrec_cobdatft.pyexpects the newsdflag.🤖 Generated with Claude Code