All posts

Mainframe Modernization With AI, From Assessment to a Migration Path

Banner reading Forge by Opsera, Mainframe Modernization With AI, with the line "Assessment, tooling and a migration path that keeps the business running", beside three server racks labelled COBOL, CICS, JCL, VSAM and DB2 and an arrow pointing right.

TL;DR

  • Mainframe modernization is rarely a single exit. In Kyndryl’s 2025 survey of 500 leaders, 56% are increasing mainframe use as part of hybrid IT, and planned workload migration off the platform fell to 28% from 36%.
  • AI is in almost every plan: 88% are deploying or planning generative AI on the mainframe, per the same survey. But Gartner predicts more than 70% of mainframe exit projects started in 2026 will miss their intended benefits because teams overestimate what generative AI can do.
  • Most estates mix four paths, chosen program by program: modernize in place, integrate through APIs, refactor and migrate, or replace and retire.
  • AI helps most with understanding: explaining COBOL, mapping dependencies, recovering business rules, and drafting tests. People still own architecture, equivalence testing, and cutover.
  • A safe path runs assess, map, specify, slice, transform, prove equivalence, then cut over. Forge by Opsera runs that path with an approval gate at each stage.

One composite property and casualty insurer still runs policy administration on z/OS: several million lines of COBOL, CICS screens for underwriters, nightly JCL batch and VSAM files that nobody has mapped end to end. The two engineers who know the rating logic best retire within three years. A vendor has pitched a full exit, converting everything to Java in eighteen months with generative AI.

The CIO’s question is reasonable: is this the year to leave the mainframe, or the year to understand it? This guide covers what mainframe modernization involves, which paths fit which programs, where AI helps, the tools available, and a step-by-step path that keeps policies issuing while the work happens.

What Is Mainframe Modernization?

Mainframe modernization is the work of making applications that run on IBM Z and similar platforms easier to change, connect, and staff. It can mean improving COBOL, PL/I, and JCL in place; exposing mainframe transactions and data as APIs; moving programs to Java or C# on cloud infrastructure; or replacing them with packaged software. Most organizations combine these approaches across one estate.

A typical mainframe application is more than its COBOL. Online transactions run under CICS or IMS, screens are defined in BMS maps, batch jobs are chained in JCL, and data sits in VSAM files, DB2 tables, and generation data groups. Modernizing one program safely means knowing which of these it touches and what else touches the same data.

Why Do Mainframes Still Run the Core of So Many Businesses?

Mainframes stay because they do one job extremely well: processing very high volumes of transactions reliably and securely, year after year. Banks, insurers, airlines, retailers, and governments run payments, policies, reservations, and benefits on them because those workloads cannot go down and must produce exactly the same answer every time.

That is why the realistic question for most teams is not how to leave the mainframe as fast as possible. It is how to make what runs on it easier to change, connect, and staff, and which parts, if any, should move elsewhere.

Why Are Teams Modernizing Mainframes Now?

Four stat cards on mainframe modernization: 88% of estates are deploying or planning generative AI and 70% struggle to find talent (Kyndryl, 2025), more than 70% of exit projects started in 2026 will miss their intended benefits (Gartner, June 2026), and 30% name ungoverned use of new technology such as AI as a top challenge (Rocket Software and Forrester, 2024).

Skills, AI, regulation, and governance all push in the same direction in 2026.

  • Skills are leaving: 70% of organizations report difficulty finding the talent they need, especially in AI, cloud, and systems integration, and 74% use external partners, per Kyndryl’s 2025 State of Mainframe Modernization.
  • AI raises the bar: 88% are deploying or planning generative AI on the mainframe, mostly for performance optimization, fraud detection, and security testing.
  • Regulation shapes every choice: 94% say regulation strongly influences their modernization plans, and 32% kept an application on the mainframe for security reasons.
  • Governance is a weak spot: In a Forrester study of 309 decision-makers for Rocket Software, 30% named ungoverned use of new technology such as AI as a top modernization challenge, and 35% said it had already caused revenue loss or delays.

When it works, the returns are high: the Kyndryl survey reports ROI of 288 to 362% across modernization paths. So is the risk of choosing the wrong path.

What Makes Mainframe Modernization Hard?

Five things make mainframe work harder than modernizing a typical web application.

  • Batch chains: Nightly JCL jobs pass files from one step to the next. Change a record layout in one program and a job three steps later can fail.
  • Shared copybooks: One copybook can define a record used by dozens of programs, so a single field change ripples across the estate.
  • Data formats: Mainframe data is often stored in EBCDIC with packed-decimal numbers. Moving it means converting formats without losing a cent or a leading zero.
  • Rules buried in code: Decades of product and regulatory changes live in nested conditions that nobody has written down anywhere else.
  • Zero tolerance for downtime: Policies, payments, and claims must keep flowing while the work happens, so every change needs a rollback path.

None of these is a reason to avoid modernization. Each is a reason to map and specify before transforming anything.

What Are the Paths for Mainframe Modernization?

Four cards for the mainframe modernization paths: modernize in place, integrate, refactor and migrate, and replace or retire, each with what it does and what it is best for. 43%, 34% and 16% of organizations shifted toward the first three in the last year, per Kyndryl's 2025 survey of 500 respondents.

There are four paths, and most estates use more than one, chosen program by program. Kyndryl found that 80% of organizations changed their modernization strategy in the past year: 43% toward modernizing more on the mainframe, 34% toward integrating more with the cloud, and 16% toward moving more applications off it. Only one of 500 respondents planned to leave the mainframe entirely, per Computer Weekly’s survey report.

PathWhat happensBest for
Modernize in placeRefactor and document COBOL on the mainframe, add tests and clean interfacesCore systems of record with strict uptime and compliance
IntegrateExpose transactions and data as APIs and events that cloud apps useSystems that stay put while new channels grow around them
Refactor and migrateMove programs to Java or C# on cloud, one bounded domain at a timeWorkloads with clear edges and a business case to leave
Replace or retireSwap for a package or SaaS product, or switch it offCommodity functions and low-value programs

Gartner’s guidance points the same way. Its June 2026 prediction advises a “platform-smart” approach and notes that “GenAI can be more effectively used to enable modernization in place,” according to VP analyst Alessandro Galimberti in the Gartner press release.

How to choose a path for each program

Four questions settle most programs:

  1. Is it a differentiator? If the logic is what makes your products different, keep and modernize it, in place or by refactoring. If it is commodity, consider a package.
  2. Does it change often? Programs that change every release gain most from a modern stack. Stable programs that rarely change can stay where they are behind an API.
  3. How tangled is it? A program with clear inputs and outputs is a good migration candidate. One that shares data with dozens of others should be integrated first and moved later, if at all.
  4. Who still understands it? If the experts are leaving, recovering its rules into specs comes first, whatever the path.

At the insurer, homeowners rating answered yes to the first, second, and fourth questions and had clean edges on the third, which made it the obvious first slice.

Where Does AI Help in Mainframe Modernization, and Where Does It Not?

AI helps most with understanding legacy code and least with deciding what the new system should be.

Where it helps:

  • Explaining code: Summarizing what a COBOL program, copybook, or JCL job does, in plain language.
  • Mapping dependencies: Tracing which programs read and write which VSAM files and DB2 tables, and which jobs run in what order.
  • Recovering business rules: Pulling rating, eligibility, or posting rules out of nested conditions into specs a person can review.
  • Drafting tests and documentation: Generating test cases from recovered rules, and documentation nobody had time to write.

Kyndryl’s Michael Vincetic told Computer Weekly that agentic AI can do this work in roughly half the time, while stressing that “the expert in the loop is still very critical.”

Where it does not replace people:

  • Target architecture: Translating line by line keeps the old design. Choosing service boundaries is a human decision.
  • Proving equivalence: The new system must produce the same results as the old one on real data, including month-end and year-end runs.
  • Operational controls: Availability, disaster recovery, and audit requirements do not come from the code.
  • Cutover: Deciding when a slice is ready to go live, and how to roll it back, stays with the team.

This is where Gartner’s warning bites. Exit projects fail when the plan assumes AI will do the second list as well as the first.

What Enterprise Programs Teach About Mainframe Risk

Three public cases show where the risk sits, and none of them is about translating code.

Skills risk: New Jersey, 2020

When pandemic unemployment claims surged past 362,000, New Jersey’s roughly 40-year-old mainframe systems struggled, and Governor Phil Murphy publicly asked for volunteers who knew COBOL, per CNBC. The hardware was not the bottleneck; the shortage of people who understood the code was. That is the case for recovering business rules into readable specs before the experts leave.

Cutover risk: TSB, 2018

TSB moved its customer data to a new platform in April 2018. The data moved, but the platform failed straight away, disrupting branch, phone, online and mobile banking for a significant share of its 5.2 million customers, with some problems lasting until December. UK regulators fined TSB £48.65 million in 2022 and said the bank “failed to plan for the IT migration properly,” per the FCA. It was not a mainframe-to-cloud move, but it is the clearest public example of why equivalence testing and a rollback path come before a big-bang cutover.

Cost of replacement: Commonwealth Bank of Australia

CBA replaced its legacy core banking with SAP in a multi-year program of about A$1.1 billion, with around 10 million retail accounts on the new platform, per Finextra. It delivered, but it shows what the replacement path costs at enterprise scale and why most organizations reserve it for a few systems.

The common lesson: understand what you have, prove the new system matches the old one, and move in slices you can roll back.

What Tools Are Used for Mainframe Modernization?

Tooling falls into four categories, and a serious program usually needs one from each.

CategoryWhat it doesExamples
Discovery and assessmentInventories programs, maps dependencies, scores code healthForgeScore and Knowledge Graph in Forge by Opsera
AI code assistants for ZExplain COBOL, suggest refactors, help translate selected programsIBM watsonx Code Assistant for Z
Transformation and runtimeConvert or rehost programs and run them off the mainframeAWS Transform for mainframe, rehost runtimes from Rocket Software and NTT DATA via AWS Mainframe Modernization
Governance and deliveryTurns recovered rules into specs, gates each stage with approvals, traces every changeForge by Opsera

The first three categories get most of the attention. The fourth decides whether the output of the others can be trusted, which is the gap the Rocket and Forrester study pointed at when 30% named ungoverned AI as a top challenge.

A Seven-Step Mainframe Migration Path

The path below works for any program you decide to refactor and migrate, and its first three steps are just as useful if you modernize in place.

  1. Assess: Score each application and pick the first candidates by business value and technical health.
  2. Map: Trace programs, copybooks, JCL jobs, CICS transactions, and data stores, and identify which ones share data.
  3. Specify: Recover business rules into specs that business owners can read and approve.
  4. Slice: Choose a bounded domain, such as one product line’s rating, with clear inputs and outputs.
  5. Transform: Generate and refactor code for the target platform, with AI doing the volume and people reviewing the design.
  6. Prove equivalence: Run old and new side by side on production-like data, including month-end and year-end cycles, and compare outputs field by field.
  7. Cut over and retire: Switch traffic for that slice, keep a rollback path, then retire the old programs and data.

The insurer’s team used this path on a single product line first. Steps one to three ran across the whole estate. Steps four to seven ran only on homeowners rating, which had clear inputs and a well-defined output: a premium.

Walkthrough: The First Four Steps in Forge on AWS CardDemo

To show the first steps on real mainframe code rather than a slide, we ran AWS’s open-source CardDemo through Forge by Opsera. AWS published CardDemo specifically to test mainframe migration and modernization tooling: a credit card management application built from COBOL, CICS transactions, BMS screens, VSAM files, and JCL batch, with optional DB2, IMS, and MQ modules. It is small next to a real policy administration system, but it has the same moving parts.

Step 1, Assess: know what you have

Forge scanned all 313 files, gave the codebase a ForgeScore of 59 out of 100, and returned a plain verdict: a mix of well-supported mainframe technology and out-of-sync areas. COBOL, CICS, VSAM, DB2, IMS, and MQ are still supported. What is missing is the modern scaffolding around them: no automated test framework, no CI/CD pipeline, and no observability configuration.

Forge assessment of the AWS CardDemo repository with a verdict of Mixed, Updates Recommended. It notes well-supported COBOL, CICS, VSAM, DB2, IMS and MQ alongside no automated test framework, no CI/CD pipeline and no observability configuration, above an application overview.

The tech stack inventory makes the estate concrete: 106 COBOL files with about 41,000 lines, 21 BMS screen maps, CICS resource definitions, embedded DB2 SQL, IMS segments and MQ integration. The two rows marked outdated are the ones an insurer would recognize: testing, with zero of 313 files covered, and a build that lives in JCL samples and shell scripts instead of a single manifest.

Forge Tech Stack Inventory for CardDemo listing 18 detected technologies. Testing and build tooling are marked outdated, with zero of 313 files covered by tests. COBOL (106 files, 40,931 lines), IBM CICS and BMS maps (21 files) are marked acceptable.

Step 2, Map: trace programs, data and dependencies

Forge’s Knowledge Graph mapped CardDemo into 3,564 entities and 3,290 relationships. Its architecture rules scored 83 out of 100: no circular dependencies, no cross-domain coupling problems, and no single points of failure, but 10 “god” entities with more than 20 connections each. Those hubs are where a change to one shared screen routine or copybook ripples into many programs, so they are the first places to put tests.

Forge System at a Glance for CardDemo with 3,564 entities and 3,290 relationships, and Architecture Rules scored 83 out of 100. Five rules pass, including circular dependencies, cross-domain coupling and single points of failure, and one critical rule flags 10 god classes or services.

Step 3, Specify: recover the business rules behind the code

This step counts most when the experts are about to retire. Forge’s Intelligence view reads the code and the graph and names what the system does in business terms: four domains (card account operations, authorization monitoring and fraud control, security administration, and transaction inquiry and reporting), eleven capabilities, and five end-to-end workflows such as “Pay a Bill in Full” and “Flag an Authorization as Fraud.”

Forge Knowledge Graph in the Intelligence view for CardDemo, with a graph linking domains, capabilities and workflows on the left. The right panel lists 4 domains and 11 capabilities, including Account Update Processing, Bill Payment Processing and Fraud Review.

Open any capability and Forge explains how it works in the code. For bill payment, it traces the COBIL00C program: how it tells a first entry from a re-entry using the COMMAREA, how it validates that an account is selected, and how, once the user confirms, it reads and updates the account record and writes a transaction. That is the kind of explanation that used to live only in a senior engineer’s head, now written down where a business owner can check it.

Forge Bill Payment Processing capability panel for CardDemo. How it works traces the COBIL00C program through MAIN-PARA and PROCESS-ENTER-KEY, and the panel also lists connections, the parent domain Card Account Operations, the Pay a Bill in Full workflow and key entities.

Step 4, Slice: turn one capability into an approved intent

Following the insurer’s approach, we picked one slice: bill payment. We gave Forge the goal in plain words: move bill payment (COBIL00C and its account and transaction data) to Java services on AWS behind an API, keep everything else on CICS, match the COBOL outputs field by field before cutover, keep a rollback path, and handle card numbers, CVVs, and SSNs under PCI-DSS.

Forge turned that into a structured intent grounded in what the scan had found. It named the people involved, from everyday CardDemo users and admins to the modernization engineers, the compliance reviewers, and the mainframe operations team that runs CICS, JCL, and the batch cycle.

It wrote security requirements in testable terms, such as masking card numbers in every log and trace, keeping CVVs out of the API’s storage, logs, and responses, and writing an immutable audit record for every change. And it carried the gaps from the assessment straight into the plan: because the repository has no tests, the first requirement is a golden-master harness that captures the COBOL program’s screens, records and error cases before anything is rewritten, followed by secrets management, reconciliation evidence and observability for the new service.

Forge Intent document for CardDemo with status complete. The vision is to modernize the CB00/COBIL00C Bill Payment slice as Java services on AWS while the rest stays on CICS, followed by target personas and an Approve and Continue prompt.

Nothing moves on from here automatically. The intent waits for a person to approve it before Forge generates the PRD, then the architecture, then user stories and work orders, each stage behind its own approval. That is the split this guide argued for: Forge does the reading, mapping and drafting at machine speed, and the architecture, equivalence and cutover decisions stay with the people accountable for them.

Conclusion: Understand the Mainframe Before You Leave It

The insurer did not sign the eighteen-month exit. It mapped the whole estate first, recovered the rating rules into specs the two retiring engineers could check while they were still there, and moved homeowners rating off the mainframe with outputs proven equal before cutover. The rest of policy administration stays on z/OS for now, better documented, better tested, and with APIs in front of it, and the next slice is already chosen.

That pattern matches what both the surveys and the public failures say. Most organizations are modernizing on the mainframe, integrating around it and moving selected workloads off it, not leaving it outright. AI makes every one of those paths faster, mainly by turning code nobody understands into knowledge people can check. The decisions that sink programs when they go wrong, architecture, equivalence, and cutover, still belong to the team.

If your estate has programs only one or two people understand, start there, before those people retire. Bring one mainframe application into Forge by Opsera, score it, map it, recover its rules, and decide its path with the facts in front of you.

Questions.

What is mainframe modernization?

Mainframe modernization is making applications on IBM Z and similar platforms easier to change, connect, and staff. It can mean improving COBOL in place, exposing transactions as APIs, moving programs to Java or C# on cloud, or replacing them with packaged software. Most organizations combine these paths across one estate.

Can AI convert COBOL to Java automatically?

AI can translate code and speed up the work, but translation alone rarely delivers the benefit. Gartner predicts more than 70% of mainframe exit projects started in 2026 will miss their intended benefits because teams overestimate generative AI. People still need to design the target architecture and prove the new code behaves the same.

What is the best approach to mainframe modernization?

There is no single best approach. Choose a path per program: modernize in place for core systems of record, integrate through APIs where new channels are needed, refactor and migrate bounded domains with a business case to leave, and replace or retire commodity functions. Kyndryl found 80% of organizations changed their strategy in the past year.

How long does mainframe modernization take?

It depends on scope. Assessing and mapping dependencies across an estate can take weeks, while migrating a single bounded domain usually takes months because equivalence must be proven across month-end and year-end cycles. Large estates are modernized in waves over several years, with most systems staying on the mainframe longer than first planned.

How does Forge help with mainframe modernization?

Forge by Opsera scores a mainframe codebase with ForgeScore, maps its programs, files, and data in a Knowledge Graph, and turns recovered rules into intent, requirements, architecture, and work orders. Each stage needs a person's approval before the next runs, so AI does the volume of analysis while the team keeps the decisions.

Two people at work on code, seen from behind their monitors.

See it running on your own pipelines.

Forty-five minutes with our engineers. Bring a pipeline you are unhappy with.

Book a demoNo install required