Skip to content

Siblings of #4996: noninteger / P-scaled numeric senders outside MOVE-to-X and STRING #5032

Closed

Description

@squid-protocol

Siblings of #4996 (class: numeric sender whose PICTURE is not a plain integer, or whose zoned bytes are not digits, read by a non-arithmetic statement). Found by the class sweep in PR #5031; IBM (Enterprise COBOL 6.4 Language Reference) is the reference, GnuCOBOL the instrument.

  • MOVE of a noninteger numeric item to a NATIONAL (or national-edited) receiver: Table 51 says invalid, but PR det: P-scaled zoned sender class -- MULTIPLY/DIVIDE, DISPLAY/INITIALIZE holes, STRING/refmod bytes, cobc value probe (Part of #4996) #5031's noninteger_to_text covers alphabetic / alphanumeric / alphanumeric-edited only. Refuse by name.
  • UNSTRING: a P-scaled or noninteger numeric item as the sending item / DELIMITED BY / INTO operand. Check IBM's UNSTRING rules and refuse by name where IBM rejects.
  • Signed zoned sender with sign byte ! (0x21) MOVEd to an alphanumeric item: cobc rewrites the sign to a digit, det copies the byte. Not P-specific; decide per IBM (undefined data, C11) and either model or ASSUME by name.

Siblings: #4996, #4692. Part of PR #5031's follow-up.

Activity

  1. added
    bug
    legacy-modernization
    priority: low
    on Oct 13, 2026
  2. squid-protocol commented on Oct 14, 2026

    @squid-protocol
    OwnerAuthor

    Class sweep from PR #5073 (which covers the three boxes above): one more member of the same class, not covered there (different mechanism):

    • INSPECT with a P-scaled / noninteger numeric item, and a reference-modified P-scaled sender: check IBM's INSPECT rules (Language Reference) and refuse by name where IBM rejects; ASSUME/REFUSE by name otherwise.

    (UNSTRING into a national receiver is unreachable: national items are refused at layout.) Keep this issue open until this box is done.

  3. squid-protocol commented on Oct 14, 2026

    @squid-protocol
    OwnerAuthor

    Closing: PR #5073 covers all three boxes. (1) MOVE noninteger -> NATIONAL is already refused by name at layout (#4462/#4664) and is now tested across 6 senders x 6 national declarations, recorded in C11. (2) UNSTRING numeric operands are refused by name in Gen.unstring_operands: IBM rejections plus the port conservative REFUSED/ASSUMED choices, named in C11. (3) A signed zoned sender with an undefined sign byte MOVEd to X is refused at run time (Cobol.refuseUndefinedSign, IBM undefined data, C11). Remaining INSPECT / ref-mod P senders use a different mechanism and are not part of this checklist.

  4. added
    scope:sweep
    era:2
    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

    bugera:2legacy-modernizationpriority: lowscope:sweep

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions