Skip to content

COBOL call resolution: CALL 'X' resolves to a forked member that also says PROGRAM-ID X instead of the member named X #4419

Closed

Description

@squid-protocol

Problem

Real estates keep old forks of a program (PROG#OLD, PROGV2, PROGOLD) whose source still says the original PROGRAM-ID. When several members hold the same PROGRAM-ID, the call resolver can pick a fork. In estate-crucible v0.4.0 (horror H-0050), ORDMAIN's CALL 'ORDVAL' gets resolves_to = apps/ORDR/cobol/ORDV#OLD.cbl (a dead fork still saying PROGRAM-ID. ORDVAL) and draws its call edge there, not to ORDVAL.cbl.

Why it matters

The live program's call graph, fan-in and reachability are wrong, and the dead fork looks alive. Per the Enterprise COBOL Programming Guide (p.548), the PROGRAM-ID must equal the name of the program object the CALL loads. In practice that object is built from the member of that name, so a member whose name matches the CALL target is the evidence.

Acceptance criteria

  • When several members declare the same PROGRAM-ID, prefer the member whose name equals it. If none does, keep today's rule, and report the ambiguity in the scan summary rather than guessing silently.
  • Same rule for EXEC CICS LINK / XCTL and JCL EXEC PGM resolution.
  • H-0050 passes; regression tests for the fork shape and the no-matching-member case.

Found by estate-crucible v0.4.0 phase 3 (estate realism, #4317), scored on main by tests/tools/estate_crucible.py (PR #4418 has the scorecard).

Activity

  1. added
    bug
    core-engine
    legacy-modernization
    on Oct 5, 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

    bugcore-enginelegacy-modernizationpriority: mediumscope:sweep

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions