You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Globe: DECIMAL-POINT IS COMMA Silently Corrupts Numeric Scale #3984
data-integrityIssues relating to RAM state or SQLite database fidelitylegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: highCore feature broken, but workarounds exist
In European and South American COBOL estates, it is standard practice to declare DECIMAL-POINT IS COMMA in the SPECIAL-NAMES paragraph. This swaps the syntactic function of . and ,.
Currently, the Java generator (_pic_numeric in cobol_to_java_repository_forge.py) statically evaluates PICTURE clauses assuming US standards. If it encounters PIC 999,99, it ignores the comma (treating it as an insertion character rather than a decimal point) and returns a scale of 0 instead of 2.
The Impact
A value of 123,45 (123 Euros and 45 cents) will be incorrectly instantiated as a BigDecimal of 12345 Euros. This is a silent, catastrophic financial corruption that occurs without any exceptions being thrown.
Required Action
The parser must detect the presence of DECIMAL-POINT IS COMMA in the SPECIAL-NAMES paragraph and attach it as a property to the program's AST/DAG.
_pic_numeric must consult this property before determining the scale of numeric variables.
data-integrityIssues relating to RAM state or SQLite database fidelitylegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forgingpriority: highCore feature broken, but workarounds exist
Activity