| 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 →Find the PROCEDURE DIVISION
The analyser locates the PROCEDURE DIVISION boundary so it only inspects executable code, not DATA or ENVIRONMENT sections.
Extract paragraph definitions
Lines that start at column 1–5 and match a paragraph or section label pattern are collected as defined entry points.
Scan for references
Every PERFORM, GO TO, and ALTER … TO PROCEED TO statement is scanned to build the set of reachable paragraphs.
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.