TL;DR. A large part of the German economy runs on code that hardly anyone can still read. AI does not translate that code into a new system at the push of a button. It makes the most expensive part of every modernization cheaper: understanding. The robust path has three layers: understand the legacy code, pin down its behaviour with tests, then translate function by function. The models improved markedly in 2026. Porting whole programs without a single error is still rare, though.
Core banking, insurance portfolios, public administration: their most critical processes sit in COBOL programs that have run reliably for decades, and for exactly that reason nobody touches them. The problem is not the technology. The problem is that the people who understand these systems are retiring and taking their knowledge with them.
That is why COBOL modernization with AI is now on the agenda. The bottleneck of every legacy modernization was never rewriting. It was understanding what the old system actually does. That is where AI shifts the costs.
Why the big bang fails
IT history is full of failed big-bang rewrites. A team spends years rewriting the legacy system from scratch. On cut-over day it turns out that the new system does not know hundreds of unwritten business rules that grew in the old one over decades. In a bank, an insurer or a public authority, that damage threatens the organisation itself. Switching a policy administration or a payment system overnight risks exactly that.
The robust alternative has been known for years and is called the strangler fig pattern. You wrap the new system around the old one like a strangler fig, carve out one function after another and replace it while the rest keeps running. AI does not make this approach obsolete. It makes it faster and safer.
First layer: understand and document legacy code
An AI can read a COBOL program and explain in plain language what it does: which business rules it contains, which data flows, which special cases. Undocumented programs become a searchable knowledge base. That does not replace the judgement of an experienced developer. But it gives her an overview in hours that used to take weeks. In COBOL modernization with AI, this is the first concrete lever.
The models can now see large codebases at once. The current Claude models, for example, handle up to one million tokens of context at the normal price. For an entire enterprise codebase that is still rarely enough. So you work program by program and record the results in a knowledge base.
Second layer: tests as a safety net
Before you touch a single line of the legacy system, you need a net that captures its behaviour. Characterisation tests are that net. They do not check what the system should do, but what it actually does. Writing such tests by hand is tedious. That is exactly what AI can prepare at scale: derive inputs and expected outputs from the legacy system, so that every later migration is checked against the documented actual behaviour.
Safety net first, migration second. A characterisation test that the AI prepared and a person reviewed catches the error before it reaches production.
How easily an error slips through is shown by an example from our post on OpenAI’s COBOL evaluation: COBOL truncates surplus decimal places, a rewrite in Java rounds commercially. Both run without errors. Across a million interest postings, every second one is still off by a cent. A test that only checks whether the new program runs will not find this. A comparison with the old outputs finds it at once.
Third layer: translate incrementally
With understanding and a test net, the actual migration becomes manageable. The AI proposes a translation of a carved-out function into the target language, such as Java or whatever fits the target architecture. A person reviews it, and the tests confirm that the behaviour has not changed. Function by function moves from the mainframe into the new world without operations ever stopping. That is the opposite of a big bang: small, checked, reversible steps.
The tool landscape in 2026: who does what
The tool market has sorted itself along one question: do you want to leave the mainframe, or modernize on it? The choice of tool follows the target picture, not the other way round. If you buy a tool first and then look for a strategy, you have the order reversed.
- IBM watsonx Code Assistant for Z has used an agentic workflow for modernization on the platform since version 2.8 of December 2025: detect dependencies, analyse impact, generate code to standards, check build and compilation. Tools connect through the Model Context Protocol. The target picture behind it: the mainframe stays, the code becomes manageable.
- AWS Transform for mainframe is the route for exiting to the cloud, as an agentic service from assessment through extracting business rules to translation into Java. Important for current plans: the self-managed experience of AWS Mainframe Modernization has not accepted new customers since summer 2026. At AWS, the way now leads through Transform.
- Claude Code targets the analysis. On February 23, 2026, Anthropic described how Claude Code maps dependencies, documents workflows and flags risks in legacy code. The stock market showed how seriously this was taken: IBM shares lost about 13% that day, the worst trading day since October 2000. Reading code is still not understanding it.
- Rocket Software took over OpenText’s modernization business, which came from Micro Focus, in May 2024. That lets Rocket serve the fourth target picture: keep COBOL but change the platform, without a rewrite.
An honest assessment includes what language models can measurably do today and what they cannot. Three evaluations show how much the result depends on what you test.
- COBOLEval has models solve 146 tasks in COBOL. According to a study from April 2026, only 41.8% of GPT-4o’s code compiles, and 16.4% is right on the first attempt. A model trained specifically on COBOL reaches 73.95% and 49.33%.
- OpenAI’s COBOL migration of October 19, 2026 measures porting COBOL programs to modern languages. GPT-6.1 Sol gets 86.6% right without errors, its predecessor 5.4%; with more compute it is 97.9%. The vendor measured itself.
- Vals AI independently tests whole programs (as of October 19, 2026), 120 migrations with 100 to 400 hidden tests each. The best model passes 86.9% of the tests. It passes all tests in only 18 of 120 migrations.
What “error-free” means: three evaluations, three results
COBOLEval · right on the first attempt, April 2026
OpenAI COBOL migration · vendor’s own evaluation, October 19, 2026
Vals AI, whole programs · all tests passed, independent
Research also shows that verification is the key. The SEDCoT approach couples translation by a language model with symbolic execution and delta debugging: tests are generated automatically, failed cases go back to the model for repair. That confirms the second layer of this post. Without a test net, each of these tools is flying blind.
The reality check: why Gartner sees 70 percent failing
If you think the warning about the big bang is too gloomy, look at the analysts. In a press release of June 18, 2026, Gartner predicts that more than 70% of mainframe exit projects started in 2026 will not deliver their intended benefits. The reason given is remarkable: not the mainframe technology, but overestimating what generative AI can do today. Gartner also expects that by 2030, 75% of mainframe exit vendors will change their business model or leave the market.
Gartner: mainframe exit projects started in 2026
missothers
The analysts’ advice matches the approach of this post: use generative AI to modernize in place rather than to accelerate an exit. That is exactly what the three layers do. They modernize where the system runs, in small, checked, reversible steps, instead of betting on a cut-over day when everything has to work at once.
Three documented paths in German-speaking practice
Atruvia: strangler fig on the platform. According to an IBM case study, the IT provider of Germany’s cooperative banks has Java-enabled around 85% of its core banking transactions in IMS, some 400 million Java transactions a day. Java runs there alongside the existing COBOL on the mainframe. A shared runtime connects 31-bit COBOL and 64-bit Java, so Java can replace individual COBOL subroutines without rewriting large programs. That is refactoring in place and probably the best German example of the strangler fig approach in core banking.
Deutsche Bank: rule-based transformation. For Deutsche Bank’s “KreditManager”, a case study by the vendor TSRI documents porting 383,358 lines of COBOL and 13,864 lines of JCL to Java, 99.7% automated and within twelve months. The translation was rule-based, not generative. The case shows that automated translation is possible without a language model when the rules are spelled out. AI adds to this route mainly in understanding and securing.
German pension insurance: modernizing core procedures across all carriers. With rvEvolution, the Deutsche Rentenversicherung is modernizing its core procedures for pension calculation and account management jointly across all carriers. It calls this its biggest and most important project of the coming years. In parallel, DRV Bund has set up its own AI lab with specialists. Public administration, too, is taking the step-by-step route.
What is not negotiable
AI invents business rules. A language model can give a plausible but wrong explanation of a COBOL program. In a payment system, a wrong rule costs more than no rule at all. Every AI output has to run against tests and human judgement. Responsibility stays with the team, not the model.
A regulated environment means auditability. In banks and insurers, every step must be traceable and verifiable. A black box that outputs code nobody can justify is useless here. What counts is a checked trail: what was translated, against which tests, approved by whom.
Data stays under control. Source code of core systems is highly sensitive. The models that read it belong on controlled infrastructure with a clear legal situation, not on an arbitrary API in a foreign jurisdiction.
Frequently asked questions about COBOL modernization with AI
Can ChatGPT or Claude really translate COBOL to Java?
As a starting point yes, as a finished result no. In OpenAI’s evaluation, the newest models port up to 97.9% of programs without errors. With whole programs and many tests, though, the best model in Vals AI’s independent evaluation completes only 18 of 120 migrations fully. An AI translation becomes production-ready only with characterisation tests and systematic checking, that is, with the second and third layers.
What does a COBOL modernization cost?
A serious figure only exists after the analysis. Costs depend on code size, documentation, existing test coverage and the target architecture, and these factors vary enormously between organisations. AI mainly lowers the cost of analysis and understanding, not of securing the result. Tests, reviews and the audit trail remain human work.
How long does a COBOL modernization take?
Counted incrementally, more like quarters per business domain than years for the whole thing in one go. The decisive difference is not the total duration but the risk. Every step delivers checked value and can be reversed.
Replace COBOL or keep it?
Keep it more often than many think. Gartner advises using generative AI to modernize in place and expects more than 70% of mainframe exits started in 2026 to miss their goal. The right question is not “COBOL yes or no” but: which functions need a new home, and which run better on the platform, modernized and documented?
Why do AI-assisted mainframe migrations fail?
For four recurring reasons: the tools’ abilities are overestimated. The codebase is larger than what a model can see at once. Reading code is confused with understanding business logic. And comparison tests that pin down actual behaviour are missing. None of these is an AI problem in the narrow sense. All four are problems of method that the layer model addresses.
Which tool: IBM watsonx, AWS Transform or Claude Code?
The target picture decides, not the tool. If you stay on the mainframe, look at IBM watsonx Code Assistant for Z or at Rocket Software (keep COBOL, change platform). If you want to exit to the cloud, you end up with AWS Transform. If you first need to understand what the legacy system does, you start with analysis, which is where Claude Code comes in.
How azena approaches it
We do not build an off-the-shelf migration platform but custom AI for organisations whose core business depends on a legacy system: understanding, securing, translating step by step, with human review at every step. The honest starting point is not choosing a tool but a question: which legacy system holds your business together, and who still understands it? If you would like to go through that, we are happy to talk.