Modernising COBOL with AI: a guide to technological legacy

Claude by Anthropic applied to the modernisation of COBOL systems

Did you know that 70% of the world’s banking transaction processing still runs on COBOL systems? Modernising COBOL with AI has become one of the most strategic —and least visible— disciplines in digital transformation. Modernising a system written 40 years ago is not simply a matter of rewriting it: it means understanding decades of business logic embedded in millions of lines of code. In this article we look at how artificial intelligence is radically changing the way these projects are approached.

Modernising COBOL with AI in legacy banking systems

COBOL projects with AI: why they remain critical

COBOL (Common Business-Oriented Language) was created in 1959 and has survived every technological revolution since. According to IBM, there are more than 220 billion lines of active COBOL code in the world, most of them running critical systems in banking, insurance, public administration and logistics.

The silent pillar of the financial system

What’s more, every time someone uses a cash machine, makes a card payment or files a tax return in many countries, a COBOL program is involved at some point in the transaction. These systems are not a historical relic: they are the silent pillar on which much of the modern digital economy is built.

The generational handover problem

On top of this, the generation of COBOL programmers is retiring without enough replacements coming through. Tackling COBOL projects with AI is not an option but a strategic necessity to avoid the irrecoverable loss of technical and business knowledge.

COBOL projects with AI: specific modernisation challenges

Modernising a COBOL system poses very different challenges from those of a greenfield development project.

Scarce documentation and tacit knowledge

For this reason, many COBOL systems lack up-to-date documentation. The business logic is embedded in the code, in sometimes contradictory comments and, above all, in the heads of professionals who have maintained the system for decades. When those professionals retire, the knowledge is lost unless there is a systematic process to capture it.

Invisible dependencies

In addition, COBOL systems are usually integrated with other critical systems through batch interfaces, message queues and flat files that evolved without any overall design. Because of this, a seemingly harmless change in one program can break processes that run at three in the morning without anyone noticing until several days later.

The all-or-nothing risk

The greatest risk, however, is the ‘big bang’ approach: rewriting everything from scratch to replace the entire system on a set date. History is full of failed modernisation projects that cost hundreds of millions without ever managing to replace the original systems.

Modernising COBOL with AI: how AI speeds up the process

Generative artificial intelligence has undoubtedly changed the landscape radically. What five years ago was a slow, manual process can today be significantly accelerated with specialised AI tools.

COBOL projects with AI: automated code analysis

In this context, language models trained specifically on COBOL can analyse millions of lines of code in hours, identify patterns, detect dead logic and generate documentation automatically. The first step of any modernisation project —understanding exactly what the current system does— is cut from months to weeks. This assisted analysis is the starting point of any serious COBOL modernisation with AI. It turns an opaque system into a map that the team can discuss, validate and prioritise.

AI-assisted translation to modern languages

Tools such as IBM watsonx Code Assistant for Z make it possible to translate COBOL programs to Java or other modern languages with AI assistance, preserving the business logic. This is not a literal translation but an intelligent refactoring that maintains the observable behaviour of the system.

Test generation

AI can also automatically generate regression test suites from an analysis of the original code. Each change can be validated against the expected behaviour without having to write thousands of test cases by hand. In practice, this is one of the levers that most reduces the cost and risk of modernising COBOL with AI. Validating behaviour without relying on the memory of whoever programmed it is what makes the change safe.

COBOL projects with AI: recommended methodology

Finally, tackling this kind of modernisation requires a structured methodology that combines the best of AI-assisted analysis with the rigour of classic project management.

COBOL projects with AI: Phase 1, discovery

Run a discovery phase in which AI analyses the entire code base, identifies critical components, maps dependencies and generates baseline documentation. What’s more, involve from the outset the human experts who still know the system: AI speeds things up, but their tacit knowledge is irreplaceable.

Phase 2: incremental strategy

Define an incremental modernisation strategy, not a ‘big bang’. The ‘strangler fig’ pattern, for example, lets you gradually replace modules of the original system without interrupting the service. Each modernised module can be validated in production before you tackle the next one.

Phase 3: continuous validation

Finally, set up a continuous validation framework where each change is automatically compared with the behaviour of the original system. AI-generated tests are combined with manual tests designed by business experts to make sure nothing critical breaks.

COBOL projects with AI: regulatory compliance and risk management

This kind of modernisation is generally carried out in highly regulated sectors (banking, insurance, public administration), which adds an extra layer of complexity.

COBOL projects with AI under DORA and NIS2

Modernisation must comply simultaneously with regulations such as DORA in the financial sector or NIS2 for critical infrastructure. It is not enough for the new system to work: it must be auditable, resilient and able to demonstrate operational continuity at every step of the transition.

AI governance in modernisation

In any COBOL modernisation project with AI, this governance is not optional. Using AI to modernise critical code also requires its own governance: human validation of outputs, traceability of the model’s decisions and clear policies on which decisions are automated and which require manual approval, in line with the EU AI Act compliance checklist.

In conclusion, COBOL projects with AI represent one of the most fascinating challenges in today’s technological modernisation. The combination of historical business knowledge, modern technology and AI assistance opens a unique window of opportunity. Organisations that tackle these projects with the right methodology will not only modernise their systems: they will unlock decades of knowledge locked away in code and put it at the service of the next generation.

To place modernisation in the wider picture: digital transformation with AI and the role of the AI Project Manager.

Frequently asked questions

To put this technological legacy in context, don’t miss the story of from Ibertex to artificial intelligence: 40 years of digital evolution and the systems administration trends for 2026.

Why are we still talking about COBOL in 2026?

We are still talking about COBOL projects with AI in 2026 because COBOL runs a large part of banking, insurance and public administration. It hasn’t been replaced because it works, but the people who know how to maintain it are retiring and replacing it is expensive and risky, which is why AI comes in as a co-pilot.

How does AI help modernise COBOL code?

It translates to modern languages, documents inherited logic that no one remembers and generates tests to check that the migration preserves behaviour. It doesn’t replace the specialist, it multiplies their reach.

Is it safe to trust an AI to migrate critical systems?

Not for migrating blindly. Yes, as a co-pilot under human supervision, with automated tests and functional validation against real data. Full autonomy in this scenario is reckless. AI speeds up code translation and test generation, but the decision on business logic and regulatory rules remains human, traceable and signed off.

What are the risks of modernising with AI?

Loss of business logic implicit in the old code, dependence on a model that may change, generation of code that looks correct but fails in edge cases. That is why traceability and automated tests are non-negotiable.

Where do I start if I have hundreds of thousands of lines of COBOL?

Inventory the modules, identify the least critical ones and run a pilot with an isolated one. Measure time saved, errors detected and test coverage. Only then decide whether to scale up. Before touching any code, make sure you have the input and output data of the current system to validate functional equivalence. Without that baseline, any migration is blind.

A programme to run with little margin for error? See how I have done it.

See the nine case studies

Leave a Reply

Your email address will not be published. Required fields are marked *