Skip to content

COBOL engine: PROGRAM-ID not recorded when its separator period is missing (PROGRAM-ID. CBLDB22 + trailing blanks; PROGRAM-ID TEST16.) #4307

Closed

Description

@squid-protocol

Problem

class_start (cobol.py:382-399) needs the name to be followed by [ \t]*\., or by an immediate \n. A fixed-format line padded with blanks to column 72 and lacking the period fails both. A PROGRAM-ID keyword with no period after it fails the keyword's own \.. Either way, class_data gets no row. Enterprise COBOL accepts both with a warning-level message, so such members compile and run.

Evidence (language-crucible v1.7.0, main 737cab8 and #4290 head)

  • cobol-programming-course/CBLDB22.cbl:7 PROGRAM-ID. CBLDB22 followed by blanks to col 72, no period: class_data empty. The program compiles in the course's own JCL (DB2CBL.jcl).
  • che-che4z_lsp_project_fixtures/TEST16.CBL:2 PROGRAM-ID TEST16., and TEST51.CBL / TEST61.CBL: class_data empty. These are LSP fixtures and may be deliberately malformed, so weigh them lower.

Impact

No PROGRAM-ID means no program identity. CALL / EXEC PGM resolution to that member can only fall back to the file name, and the program is missing from the program inventory.

Acceptance criteria

  • Name followed by optional trailing blanks then newline is accepted; the period after the PROGRAM-ID keyword is optional
  • Fixtures for both shapes (fixed-format padded line)

Found during: crucible mainframe count audit (2026-10-04)

Found by a grep-vs-engine count audit of every mainframe file in language-crucible v1.7.0 (802 of 815 files compared), on main 737cab8 and the #4290 head (now merged as c136f46).

Activity

  1. added
    bug
    core-engine
    legacy-modernization
    priority: low
    on Oct 4, 2026
  2. added a commit that references this issue on Oct 5, 2026
  3. 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

    bugcore-engineera:2legacy-modernizationpriority: lowscope:sweep

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions