Skip to content

calls_out_to is meaningless for COBOL: generic name( pattern captures subscripts and intrinsics, never PERFORM/CALL targets #3202

Closed

Description

@squid-protocol

Found by the #3120 differential. function_data.calls_out_to comes from one generic pattern, \b([a-zA-Z_]\w*)\s*\(, with a C/Python keyword ignore list (detector.py). COBOL has no name( call syntax, so for COBOL the column only ever holds the word before an open parenthesis:

  • subscripts: WS-TAB(I) → TAB
  • intrinsic functions: FUNCTION CURRENT-DATE(…) → DATE
  • CICS options: PROGRAM(, COMMAREA(
  • words like UNTIL / MONTH, e.g. zopeneditor SAM2.cbl 310-CRUNCH-LOOP → ["UNTIL", "MONTH"]

It never contains a PERFORM / GO TO / CALL target.

Options: state calls_out_to as not-applicable for COBOL (empty rather than wrong), or give it a COBOL form (PERFORM/GO TO targets within the program, CALL targets across). Whichever is chosen should apply to the other mainframe languages with the same shape. Related: the call-edge issue filed alongside this one.

Activity

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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions