Skip to content

DECIMAL-POINT IS COMMA invisible to the converter: schema forge mis-sizes, no fact, no edited-PICTURE helper #3827

Closed

Description

@squid-protocol

What: GnuCOBOL honours the decimal comma (probe: 1.234,50), so a wrong port is caught; that part works. But:

  • no fact says the program uses it;
  • the ticket rule says "format as COBOL does" and offers no helper.

Where:

  • cobol_schema_forge.py:39 splits on ., so PIC ZZZ.ZZ9,99 becomes DECIMAL(3,3) instead of DECIMAL(8,2) (inferred).
  • cobol_to_java_spring_forge.py:61: the PIC regex stops at the comma.
  • The DB2 COMMA precompiler option: SQL text is shipped verbatim to PostgreSQL. Plausible, not probed.

Test: VALUE 2,5, an edited field PIC ZZZ.ZZ9,99-, and a screen field. Expected: the Java screen shows 1.234,50; the schema is DECIMAL(8,2).

Fix:

  • A SPECIAL-NAMES fact (shared with the currency issue).
  • A generated CobolEdit.format(pic, value, decimalComma, currency) helper that the porting rules require.

Found by a cultural-assumptions audit (2026-09-26): confirmed in code or by probe (JDK 17 locales, IBM code-page decoding, the harness's GnuCOBOL image) unless marked plausible.

🤖 Generated with Claude Code

Activity

  1. added
    bug
    legacy-modernization
    on Sep 26, 2026
  2. added 3 commits that reference this issue on Sep 27, 2026
  3. added a commit that references this issue on Sep 30, 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

    buglegacy-modernization

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions