Skip to content

det runtime: numeric-edited item compared with a numeric literal numerically; GnuCOBOL compares it as text #4665

Closed

Description

@squid-protocol

Problem

A relation condition between a numeric-edited item and a numeric literal gives a different answer on the det port than on the oracle. GnuCOBOL (cobc -x -std=ibm -fsign=EBCDIC) compares the edited item as alphanumeric text; the det runtime de-edits it and compares numbers.

Evidence (origin/main 6d49963, no DECIMAL-POINT IS COMMA involved)

       01  E      PIC ZZZ,ZZ9.99.
           MOVE 1500 TO E
           IF E > 1499.99 DISPLAY 'GT' ELSE DISPLAY 'LE' END-IF
           IF E > 1499 DISPLAY 'GT' ELSE DISPLAY 'LE' END-IF

GnuCOBOL prints LE / LE; the det port (test_det_programs._java_run, bytes mode) prints GT / GT. Found while writing the #4462 DPCOMMA end-to-end program (the comparison was left out of it).

Impact on a real estate

A program that tests an edited report field against a number takes the other branch after translation, with no hole or refusal saying so.

Acceptance criteria

  • Decide the rule from IBM Enterprise COBOL's comparison rules (numeric-edited operands vs numeric literals / items) and GnuCOBOL's behaviour; record any difference in oracle_assumptions.md.
  • The det runtime / generator follows it, or refuses the comparison by name.
  • A test_det_programs end-to-end program pins it against GnuCOBOL.

Found during: #4462 (DECIMAL-POINT IS COMMA slice)

🤖 Generated with Claude Code

Activity

  1. added
    bug
    legacy-modernization
    priority: high
    on Oct 8, 2026
  2. added
    scope:sweep
    on Oct 16, 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-modernizationpriority: highscope:sweep

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions