Free · No signup · Runs in your browser

COBOL Dead Code Detector

Paste COBOL source and instantly find paragraphs and sections that are defined but never PERFORMed or called — static analysis, right in your browser.

COBOL Source
0 Paragraphs found
0 Referenced
0 Unreferenced
0% Dead code %
⚠

Static analysis only. Dynamic patterns such as PERFORM paragraph-name DEPENDING ON, computed GO TO targets, and copybook-injected calls cannot be resolved without full program context. A paragraph flagged here may still be reachable at runtime.

Paragraph / Section Line Type Status

This tool flags obvious dead code in seconds. Language Foundry's four-gate pipeline performs full data-flow and control-flow analysis — tracking dynamic PERFORMs, DEPENDING ON branches, CICS entry points, and copybook dependencies — to produce a complete dead-code report with business-impact scoring.

Get a complete dead-code report →
1

Find the PROCEDURE DIVISION

The analyser locates the PROCEDURE DIVISION boundary so it only inspects executable code, not DATA or ENVIRONMENT sections.

2

Extract paragraph definitions

Lines that start at column 1–5 and match a paragraph or section label pattern are collected as defined entry points.

3

Scan for references

Every PERFORM, GO TO, and ALTER … TO PROCEED TO statement is scanned to build the set of reachable paragraphs.

4

Flag the unreferenced

Paragraphs defined but never referenced are marked as dead code. The first paragraph is always treated as the entry point.

Dead code is only the beginning

Language Foundry's transpiler doesn't just find dead code — it removes it during migration, simplifies control flow, and produces idiomatic Java 21 you can actually maintain.