Skip to content

COBOL PROGRAM-ID alone on its line reads a sequence number as the program name #3418

Closed

Description

@squid-protocol

Found by the mainframe ground-truth ledger on CardDemo. Cause: program_id_on_its_own_line. The engine and the forge both have it.

Problem

When PROGRAM-ID. stands alone on its line and the name is on the next line, the engine records a sequence-area token as the PROGRAM-ID:

002500 PROGRAM-ID.
002600     COTRTLIC.

The engine reads 002600, the next line's columns 1–6.

002200 PROGRAM-ID.                                                      00220000
002300     COTRTUPC.                                                    00230000

The engine reads 00220000 (columns 73–80), and so does the forge's analyze_cobol_intent.

Truth, checked against the source: COTRTLIC and COTRTUPC. A wrong PROGRAM-ID breaks everything keyed on it: call resolution to the program, EXEC PGM= joins, CSD transaction → program mapping, and the call graph.

Acceptance

  • The engine | program_id and forge | program_id ledger entries for these two programs stop reproducing.
  • A fixture covering the name on the next line, with and without sequence numbers in cols 1–6 and 73–80.

🤖 Generated with Claude Code

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

    bugUnintended behavior or logic failure in the enginecore-engineModifications to the central physics and parsing enginelegacy-modernizationCOBOL refractor, dead-code extraction, and JCL forging

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions