Guides · 6 min read

The Generative AI Rewrite Pitch Is Everywhere in Legacy Modernization. Legacy Dragon Deliberately Isn't One.

Every major mainframe vendor now sells an LLM that rewrites COBOL into Java for you. The pitch is fast migrations — but generative rewrites aren't reproducible, and reproducibility is exactly what a billion-dollar batch job can't do without. Why Legacy Dragon starts from a deterministic AST graph instead.

The Generative AI Rewrite Pitch Is Everywhere in Legacy Modernization. Legacy Dragon Deliberately Isn't One.

Every Vendor Now Has an LLM That Rewrites COBOL

Over the past two years, “generative AI for mainframe modernization” has gone from a research curiosity to the default pitch. IBM trained watsonx Code Assistant for Z on COBOL specifically so it can ingest a program and rescript the business logic into Java. Google Cloud and Microsoft have both published their own COBOL-to-Java agentic pipelines built on their respective foundation models. The framing across all of them is roughly the same: point the model at your mainframe estate, let it read the code, and let it write the modern equivalent — faster than a human team could, and without needing engineers who read COBOL fluently in the first place.

It’s an appealing pitch for exactly the reason we’ve written about before: the engineers who can read this code are retiring faster than replacements are being trained. If a model can do the reading for you, the shortage stops being a blocker.

The Problem Is What “Reading” Means to a Generative Model

Generative AI systems produce output through probabilistic inference — the same input can yield different output on different runs, and that’s before accounting for the much harder problem of a model producing code that looks correct, compiles, and passes a shallow test suite, while quietly getting the business logic wrong in a case the tests didn’t cover. That failure mode is specifically why it’s hard to catch: the output isn’t broken in an obvious way. It’s broken in a way that only shows up when a specific input finally exercises the path the model handled incorrectly.

The clearest illustration of what that looks like in practice comes from a direct comparison one modernization vendor has published between its own deterministic, graph-based translation process and a generative approach applied to the same COBOL estate: on one project, a billion-dollar batch calculation came out one cent off under the generative path — caught and corrected only because the deterministic process ran in parallel and flagged the discrepancy. Even run twice against identical COBOL input, a generative system can produce two different, both individually “valid-looking,” Java outputs. For a batch job that settles real financial positions, “usually right, and different each time you regenerate it” isn’t a quality bar that clears a compliance review — it’s the reason a modernization budget gets a second opinion.

None of this makes generative rewriting worthless. Industry estimates put GenAI-assisted modernization as cutting code-translation and documentation timelines by 40–50% in the cases where teams have adopted it, and a 2025 healthcare-sector case study found AI-assisted translation successfully converting roughly 65% of a legacy codebase before human engineers took over the remainder. The tooling is genuinely faster at a first draft. The open question the industry hasn’t settled is what “ground truth” the fast first draft gets checked against — and increasingly, the market’s own trust numbers suggest that question isn’t resolved. One survey tracking developer confidence in AI-generated code found trust in output accuracy dropped to 29% this year, down from 43% the year before, even as adoption of the tools kept climbing.

Why Legacy Dragon Starts From the Graph, Not From a Rewrite

Legacy Dragon is built on the opposite premise from a full generative rewrite: it parses COBOL, JCL, PL/I, VB6, VB.NET, PowerBuilder, Assembly, SQL/DB2, CICS, and REXX into an interactive AST graph — deterministically, using the same structural parsing approach every time, producing the same output for the same input. A 1,200-line COBOL program parses into that graph in about 6 milliseconds. Nothing about that process guesses at what a paragraph probably does; it maps what the control flow and data dependencies actually are, structurally, from the source itself.

That distinction matters most exactly where generative rewriting is riskiest: as the ground truth a migration team checks a generated translation against, rather than a second guess sitting alongside it with no privileged claim to correctness. A team using an LLM to draft a Java rewrite still needs an answer to “does this generated code actually preserve the control flow and data dependencies of the original COBOL” — and a deterministic AST graph, built independently of whatever the generative model produced, is a structural answer to that question rather than another probabilistic one. Reading a graph that’s the same every time you regenerate it is a fundamentally different kind of trust than reading code a model wrote once and might write differently next time.

The Estate This Actually Serves Doesn’t Get to Guess

This connects back to who’s actually deciding on modernization tooling: a 2026 industry survey found 62% of enterprises had experienced at least one security incident tied to AI-augmented development in the prior year, frequently traced to misconfigured policies or a lack of visibility into what AI-generated code was actually doing. For the banks, insurers, and government agencies running the COBOL and JCL estates we’ve covered before — the ones where a U.S. GAO report found agencies planning to spend roughly 79% of federal IT investment on maintaining existing systems rather than replacing them — “the model is usually right” was never going to clear a compliance review on its own. What clears that review is being able to point at exactly what the existing system does, verifiably and reproducibly, whether the next step is a careful manual rewrite, an AI-assisted one, or neither yet.

None of this is an argument that generative rewriting doesn’t have a place — it plainly does, and it’s getting faster and more capable by the quarter. It’s an argument that the place it doesn’t have, at least not unaccompanied, is being the only source of truth for what several decades of undocumented COBOL actually does before someone decides to replace it. That’s the layer Legacy Dragon is built to be underneath it, not instead of the modernization work altogether.


Weighing a generative rewrite against your COBOL, VB6, or PowerBuilder estate and want a deterministic map of what’s actually there first? See how Legacy Dragon’s AST graph works at dragon.aitytech.com, read more on the parsing bottleneck it was built to solve or why knowledge transfer is the real deadline, or reach us at hello@aitytech.com.

See Our Work

From MinuteAI to AgentKits — explore the products and projects we've shipped.

View Portfolio

Related Articles