Repository navigation
Fix #3984: name the program's DECIMAL-POINT in its port ticket; pin the VSAM entity under it - #3990
Merged
Merged
Conversation
…he VSAM entity under it The silent 123,45 -> 12345 corruption the issue describes does not occur on main: the repository forge's _pic_numeric rejects an edited PICTURE (999,99), so the VSAM entity keeps it as its display text (a String column, byte for byte), and only plain 9/S/V/P PICTUREs -- which DECIMAL-POINT IS COMMA cannot change -- become BigDecimals. New tests pin that through a real scan. The remaining gap: the port ticket only said generically to pass ',' / decimalComma "when the program codes DECIMAL-POINT IS COMMA", leaving the porter to find it. decimal_point_rules now adds a rule naming this program's decimal point (with its SPECIAL-NAMES line), honouring culture.decimal_point as the entities do; a program without it keeps today's rules. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Contributor
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.
Resolves #3984
Finding
The issue's silent corruption (
PIC 999,99→ BigDecimal scale 0,123,45read as12345) does not reproduce on main. A real scan of a VSAM estate withDECIMAL-POINT IS COMMAgenerates:_pic_numericreturnsNonefor any edited PICTURE, andjava_typemakes it a String column, so the value round-trips as written. Only plain9/S/V/PPICTUREs become BigDecimals, andDECIMAL-POINT IS COMMAcan't change how those are read. Detection of the clause (Required Action 1) already exists viaspecial_names(#3820/#3827/#3911), and the schema and Spring forges already use it.Changes
test_decimal_comma.py): a real scan → refractor → cobol-to-java run pins that the VSAM entity of a comma program keeps999,99/ZZZ.ZZ9,99as String text columns andS9(5)V99asprecision = 7, scale = 2.','/decimalComma"when the program codes DECIMAL-POINT IS COMMA", leaving the porter (an AI agent) to find the clause. The newdecimal_point_rulesadds a rule to that program's ticket naming its decimal point and its SPECIAL-NAMES line. It honoursculture.decimal_pointthe same way the entities do (periodoverrides the program,commaforces it). A program without the clause keeps exactly today's rules, which the test asserts.dead_key_audit.py: allowlistdecimal_point. It's written bytarget_as_dict'svars()over theCulturedataclass, which the walker can't trace.Verification
tests/cobol_mainframe: 997 passed, 50 skippedruff formatclean🤖 Generated with Claude Code