Skip to content

Globe: DECIMAL-POINT IS COMMA Silently Corrupts Numeric Scale #3984

Closed

Description

@squid-protocol

Part of GitGalaxy Tours the Globe 🌍

The Defect

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

  1. 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.
  2. _pic_numeric must consult this property before determining the scale of numeric variables.

Activity

  1. added
    data-integrity
    legacy-modernization
    priority: high
    on Sep 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    data-integritylegacy-modernizationpriority: high

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions