Skip to content

equivalence: the rest of C11 -- non-digit zoned data in arithmetic, comparisons, edited and zoned MOVEs differs from the oracle #4662

Closed

Description

@squid-protocol

Part of #4270. Found while fixing #4652 (register C11).

What. #4652 makes the det runtime compute what GnuCOBOL 3.1.2 (-std=ibm, the oracle) computes when a zoned item holding non-digits (spaces, letters) is MOVEd to a binary item. The rest of C11 still differs from the oracle. Measured 2026-10-07 (PIC 9(6) of spaces A6, PIC 9(3) holding 1A3):

statement oracle det runtime
MOVE A6 TO P7 (S9(7) COMP-3) 0 0 (agrees)
MOVE A6 TO D7 (9(7)) 0000000 0000000 (agrees)
MOVE 1A3 TO D7 (9(7)) 00001A3 (the byte copied) 0000113
MOVE A6 TO E7 (Z(6)9) 7 spaces 0
COMPUTE B9 = A6 / ADD A6 TO B9 (TRUNC(STD)) 709551600 (-16 as u64 mod 10^9) 0
COMPUTE B9 = 1A3 273 113
IF A6 = 0 false true

Also: on a MOVE of a signed zoned item to a binary item the oracle rewrites the sender's unsigned sign digit as an overpunch (0123 becomes 012C), for digit-only data too; the det runtime does that only on #4652's non-digit path (C10-adjacent).

IBM. No documented result for non-digit data in a numeric item. Each needs the same decision as #4652: model the oracle where the data is the program's own, or refuse by name.

Acceptance. Each row above either modelled (tested against GnuCOBOL like tests/cobol_mainframe/test_det_nondigit_binary.py) or refused by name, and register C11 updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buglegacy-modernizationpriority: lowscope:sweeptesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions