COBOL still runs on hundreds of billions of lines of code in financial systems, airlines, and government agencies. However, the number of developers who understand the language is shrinking every year. With Claude Code, Anthropic sees an opportunity to radically accelerate the modernization of these legacy systems.
Modernizing a COBOL system usually involves a considerable number of consultants. They spend time mapping out workflows. According to Anthropic, this lengthy process can be automated with AI. The technology provides dependency mapping, documents workflows, identifies risks, and offers deep insights. As a result, Anthropic predicts that modernizing a COBOL system would take quarters rather than years.
The modernization of COBOL systems differs fundamentally from ordinary legacy code refactoring. You don’t simply update code to better patterns. Instead, you reverse engineer business logic from systems that are around 50 years old. Dependencies that have evolved over decades are unraveled, and institutional knowledge that only exists in the code itself is found.
Claude Code maps dependencies across thousands of lines of code, documents workflows that no one remembers, and identifies risks that would take human analysts months to uncover.
From mapping to execution
AI starts by reading the entire COBOL codebase and mapping its structure. It identifies program entry points, traces execution paths through called subroutines, and maps data flows between modules. It also documents dependencies that span hundreds of files.
This mapping goes beyond simple call graphs. Shared data structures, file operations that create links between modules, initialization sequences that influence runtime behavior: these types of implicit dependencies do not appear in static analysis. They revolve around data that is shared via files, databases, or global status. This is precisely what makes COBOL modernization risky. Automated discovery finds these hidden relationships before they cause problems during migration.
After mapping, AI can assess which components are safe to move and which require careful handling.
Strategic planning with human oversight
Human expertise remains essential. COBOL engineers understand regulatory requirements, business priorities, operational constraints, and risk tolerance. AI cannot do that. The planning phase develops a detailed roadmap that strategically organizes modernization efforts.
AI suggests prioritization based on risks, dependencies, and complexity identified during analysis. The team reviews these recommendations and decides which components to modernize first. They also define testing strategies: AI designs preliminary functional tests to verify that migrated code produces identical output to legacy COBOL code.
Implementation is done one component at a time, with validation at each step. AI translates COBOL logic into modern languages, creates API wrappers around legacy components that remain in place, and builds the infrastructure to run old and new code side by side during the transition.
Organizations can start with a single component or workflow with clear boundaries and moderate complexity. AI thoroughly analyzes and documents, engineers plan the modernization, and implementation is done incrementally with testing at every step. This approach works for COBOL systems of any size and builds organizational trust.
Anthropic’s claim that Claude can rapidly modernize COBOL systems also dealt a heavy blow to IBM’s share price. It fell 13.2 percent, the biggest drop since October 18, 2000. The reason for this is that a large part of organizations’ COBOL code runs on IBM mainframes.
Tip: CoreStory launches AI platform for modernizing legacy code