Research notes
Can AI convert COBOL?
Yes — about 95% of the time when the pipeline is deterministic, and about 30% when it’s a raw LLM. The question is which 95 — and whether you can prove it.
PalmDigitalz Research · 15 min read · July 2026
Every quarter, a board somewhere asks its CIO the same question: the models can write code now — why are we still paying for the mainframe? It is a fair question, and it deserves a better answer than either vendor hype or reflexive dismissal. Hundreds of billions of lines of COBOL are still estimated to be running in production , and the estimates vary widely precisely because nobody can see inside most of it. So the honest answer has three parts: what LLMs genuinely do well here, where they fail in ways that matter, and what a pipeline has to look like before anyone signs their name to its output.
One definition first. “Convert” hides three different jobs: understand what the code does, translate it into something new, and prove that the two match. Most of the argument about AI and COBOL is people talking past each other about which of the three they mean.
Part I — What LLMs are genuinely good at here
This is not a strawman section, because the strengths are real. Ask a capable model to read a 2,000-line COBOL paragraph soup and describe its intent, and it will produce a plausible narrative in seconds — faster than any junior engineer, often catching the gist of a routine no one has read since the engineer who wrote it retired. For orientation, that is genuinely valuable.
Three uses hold up in practice. Reading intent: summarizing what a program appears to do, so a human knows where to look first. Drafting documentation: turning verified facts into readable prose, which is most of what documentation is. Review assistance: a second pair of eyes that never gets tired, flagging the paragraph a reviewer should re-check. We use models for exactly these jobs ourselves, and Part V explains where they sit in our own pipeline.
It is also worth being honest about why COBOL, specifically, sits near the edge of what these models do well. Production mainframe programs are long — a single program can run past 50,000 lines with copybooks fanning out behind it — and a model working through a context window reads such a system the way a tourist reads a city through a bus window: real glimpses, no map. And where the public internet holds oceans of JavaScript and Python for a model to learn from, the COBOL that matters is precisely the code that never left the building. The models are weakest exactly where your risk is highest.
Notice what the three good uses above have in common: in each case, a human verifies the output, or the output is not load-bearing. The failure modes begin the moment that stops being true.
Part II — The failure modes that matter
Four failure modes decide whether an AI-assisted conversion survives contact with production. None of them shows up in a demo, because demos are built from code the presenter understands. All of them show up in an estate, because estates are built from code nobody fully does.
Probabilistic variance: same input, different output
A language model samples from a distribution. Ask it to extract the rules from the same program three times and you get three artifacts — sibling documents, similar in shape, different in substance. Which one goes to the sign-off meeting? In our benchmark runs, three LLM passes over the same program produced three different outputs; the deterministic pipeline produced one, three times — three runs, one hash. Nobody can sign off on a moving target, and in a regulated cutover, sign-off is the product.
Silent semantic drift: the edge cases are the business
COBOL’s hard parts are not syntax; they are semantics that have no clean analogue in the target language. EBCDIC collation orders characters differently from ASCII, so a translated comparison can sort and branch differently on the same data. Packed-decimal COMP-3 fields carry precision and truncation behavior that a casual mapping to a float or an int quietly changes. PERFORM ... THRU fall-through means control flow depends on paragraph order in ways a structured rewrite silently reorganizes. REDEFINES makes two fields share the same bytes, and a translator that models them as separate variables has changed the program’s meaning without changing its apparent logic. Every one of these failures compiles. Every one of them reads well in review. They surface only when production data hits the edge — and in a system that has run for thirty years, the edges are where the business lives.
The audit problem: no provenance, no sign-off
Suppose the model’s extraction happens to be right. Can you show it? An LLM cannot tell you which source lines a claimed rule came from — not reliably, and not verifiably, because there is no mechanical chain from input to output. Your reviewers are left approving assertions, and your regulator is asked to accept “the model said so.” An unsourced answer is not an answer in that room; as we put it elsewhere, it is a liability with good grammar. Without lineage, even correct output is unusable at exactly the moment it matters.
Think about who actually signs a cutover in a bank or an insurer: an application owner, a risk officer, often an external auditor. Each of them signs against evidence, and evidence has a shape — this output, from this input, by this documented transformation, checkable by a third party who was not in the room. A pipeline that cannot produce that shape has not failed a technicality; it has failed the definition of the deliverable. The engineering conversation about model quality is interesting. The governance conversation about provenance is decisive.
The 2% that costs 100%
Accuracy percentages hide an asymmetry. A 98%-correct translation of an interest-calculation module is not a 98%-good system; it is a system that computes interest wrong for some fraction of accounts, in production, with the error compounding daily until someone’s reconciliation catches it. The cost of the miss is not proportional to its size — one wrong rounding rule can exceed the cost of the entire modernization program. If the errors announced themselves this would be manageable; the trouble with fluent output is that its failures are fluent too. This is why the operative question was never “what percent can AI convert” but which percent — and whether the pipeline can tell you.
Part III — Deterministic vs probabilistic translation
The dividing line in this market is not AI versus no AI. It is whether the load-bearing step of the pipeline is a parser or a sampler.
| Probabilistic (raw LLM) | Deterministic (parser-based) | |
|---|---|---|
| Same input → same output | No — output is sampled; three runs, three artifacts | Yes — three runs, one hash |
| Line-level lineage | No mechanical chain from output back to source | Every rule carries the exact source lines it came from |
| Failure visibility | Silent — errors are as fluent as the successes | Loud — the parser either proves a construct or flags it |
| Audit posture | “Trust the model” | “Check the receipts” |
| Right role in a program | Assistant — drafts, summaries, review support | System of record — the artifact you sign |
Two clarifications, because “deterministic” gets misread in both directions. It does not mean no AI — the next section and the methodology after it should make that plain. And it does not mean the pipeline claims to understand everything: a parser meets constructs it cannot prove, and the deterministic answer to those is a flag and a human, not a guess. The roughly 5% that Palm Ark does not extract automatically arrives as a named, located, reviewable list — which is a different universe from 5% of silent errors scattered anonymously through fluent output. Known unknowns are a work plan. Unknown unknowns are a production incident with a date you don’t get to choose.
The other nuance the table can’t hold: these two columns are not enemies. LLMs earn their keep inside a deterministic pipeline — proposing human-readable names for extracted rules, drafting the prose descriptions reviewers read, flagging the paragraph that deserves a second look. The determinism does the proving; the model does the prose. What a model should never be is the unverified step your cutover depends on.
Part IV — PalmBench: measure it, don’t argue it
PalmBench is our benchmark, and it is deliberately boring: one production-scale COBOL program of roughly 50,000 lines, one instruction — extract the business rules — and the receipts on the table. Each extracted rule is scored for correctness against a human-adjudicated reference, and for lineage: whether it arrives with the source lines it came from. In that benchmark, generic LLMs land around 30% with no lineage; Palm Ark lands around 95% with 100% lineage — and identical output across runs. Figures are from our internal benchmark; ask us for the methodology.
repeatability · llm: three runs, three artifacts · ark: three runs, one hash
Read the gap between those bars carefully: it is not primarily a statement about model quality. It is a statement about architecture — a sampler asked to do a parser’s job, versus a parser doing it. Swapping in next year’s model moves the first bar somewhat; it does not give the first bar lineage, and it does not make two runs agree.
Two things PalmBench deliberately does not claim. It is not a statement that language models are useless — Part I said the opposite, and the models keep improving. And it is not a universal score: it measures one task, rule extraction from production-scale COBOL, because that is the task a modernization program lives or dies on. A model that writes excellent Python and a model that scores 30% on this benchmark can be the same model. Task-specific evidence beats general reputation, in both directions.
You can run PalmBench against any vendor on the market — including us. The protocol fits in a paragraph: pick one production-scale program of yours, the uglier the better. Give every contender the same instruction — extract the business rules. Have your own experts score a sample of the output for correctness, and for every rule, ask for the source lines it came from. Then run the whole thing again and diff. The benchmark page carries the standing offer: we will reproduce it on your code, against any model you choose, inside your perimeter.
The run-it-twice test
Whoever is in the room — including us — ask them to run the same extraction twice and diff the outputs. Deterministic pipelines produce byte-identical artifacts; probabilistic ones produce cousins. It costs one meeting, and it settles the only architectural question that matters before you look at anything else. The longer version of this argument is on vs generic LLMs.
Part V — The Gazelle methodology
The Gazelle methodology is our name for the discipline behind those numbers: verifiable rule extraction, in four steps, each producing an artifact the next step — and your auditors — can check.
- 01Parse deterministically. Palm Key builds a full syntax model of the COBOL, JCL, and copybooks — no sampling, no token windows, 50,000+ lines in one pass. Whatever the parser cannot prove, it flags instead of guessing.
- 02Extract rules with lineage. Palm Ark lifts each business rule out of the control flow, and every rule carries its source paragraph and line range. rule-1040 · l.10412–10434 is an address, not a citation of convenience.
- 03Human review with receipts. Your experts accept or reject each rule against the cited lines — not against vibes. This is where LLMs assist: naming, descriptions, review prompts. The prose is drafted; the facts are checked.
- 04Generate forward. Palm Ray turns the verified rulebook into specifications, tests, and code for the target you choose — open microservices or your ERP. The full pipeline is on the method page.
Why name it for the gazelle? Because a gazelle is fast — and it never takes a step it can’t land. Speed, in this method, is a consequence of certain footing rather than a bet against it: nothing has to be redone, because every step was provable when it was taken. Programs built on guessed foundations move quickly for a quarter and then spend a year in re-verification; programs built on receipts move at one speed the whole way, which is how they arrive first.
In practice, the methodology also changes the shape of a proof of concept. Because every artifact carries lineage, a POC does not end with a demo and a feeling — it ends with a scored extraction of your own program that your own reviewers verified line by line. Whatever you decide afterwards, the rulebook is evidence you keep. That is the calm way off the mainframe, and it is also the answer to the question in the title. Can AI convert COBOL? Yes — when the AI is held inside a pipeline that can show its work. The strategy that follows from that is the Exit Doctrine.
Frequently asked questions
Can AI convert COBOL to Java automatically?
Yes, in the narrow sense: a model will produce Java from COBOL on request, and it will read fluently. The operative questions are accuracy and proof. In our benchmark, raw LLM extraction landed around 30% with no lineage; a deterministic pipeline reached around 95% with every rule traceable to source. Fluency and correctness are different properties, and only one of them survives an audit.
How accurate is GenAI at mainframe modernization?
On the task that decides a program — extracting business rules from production COBOL — generic LLMs landed around 30% in PalmBench, with a different answer on each run. That number is ours, from an internal benchmark, and we treat it accordingly: the standing offer is to reproduce it on your code, against any model you choose, inside your perimeter.
What are the biggest risks of LLM code conversion?
Three: probabilistic variance, which leaves you nothing stable to sign off; silent semantic drift in the constructs that matter most — EBCDIC collation, COMP-3 arithmetic, PERFORM fall-through, REDEFINES; and the audit problem — no provenance from output back to source, so even correct answers can’t be verified by the people who must approve them.
What is deterministic code translation?
A pipeline whose load-bearing steps are parsers and rules rather than samplers: same input, same output, every time; lineage from every artifact back to source lines; failures flagged rather than fluently papered over. Determinism is what turns an extraction from an opinion into a document you can sign.
Should we ban LLMs from our modernization program?
No — that would waste a genuinely useful tool. Put them where their strengths are and their failures are harmless: naming, documentation, review assistance, inside a deterministic pipeline. Let the parser do the proving and the model do the prose.