Skip to content

DECIMAL-POINT IS COMMA does not reach a COPYed copybook: its VALUE 1,5 is recorded as 1 #3942

Closed

Description

@squid-protocol

Left over from #3911 (fixed in #3940).

_cobol_records reads decimal_comma from the file's own SPECIAL-NAMES. A copybook has none: DECIMAL-POINT IS COMMA belongs to the program that COPYs it, and the compiler applies it to the whole compilation unit. So a copybook member's VALUE 12345,67 is still recorded as 12345 even when every program that includes it declares a decimal comma.

Fix direction: resolve the decimal comma per compilation unit, the way #3935 resolves a copybook's code page from its program. Where a copybook's facts are read on behalf of a program (record layouts, galaxy_ir copy_members), apply that program's decimal_comma. If programs with different settings share one copybook, say which one wins, or record the conflict.

Test: a decimal-comma program that COPYs a copybook with 05 X PIC 9(5)V99 VALUE 12345,67. records the copybook item's value as 12345,67. The same copybook COPYed into a program without the clause keeps 12345. A VALUE 1, 2, 3 list still splits.

🤖 Generated with Claude Code

Activity

  1. added a commit that references this issue 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

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions