How to Use AI to Modernize COBOL Code: What OpenAI's New Tests Show
Short answer
Start with one small COBOL program. List its inputs, outputs and business rules. Ask a model to draft a new version. Then run both versions on the same test cases. OpenAI’s October 19 research release shows better scores on two coding tests. Neither score tells you whether your own system is safe to switch.

You will learn: what OpenAI tested, what its scores mean and how to test one migration. The article also covers work that the tests leave out.
Two evaluations, not one modernization score
OpenAI studied COBOL, Fortran and Visual Basic. These languages have less public training material than Python or JavaScript. It ran two different tests. One asks a model to build new software in a given language. The other asks it to convert an existing COBOL program without changing its output. They cannot be combined into one modernization success rate.
OpenAI evaluation | Task | Pass condition | What it does not establish |
|---|---|---|---|
MultiLangBench | Build a SQLite-compatible database engine in one of 20 languages | Tests compare the modified database with reference SQLite behavior | That an existing enterprise COBOL system has been migrated |
COBOL migration evaluation | Convert existing COBOL programs to C++, Java, Kotlin, Python or Rust | Hidden tests require exact observable-output parity, with all tests passing for a migration to count | That the candidate handles every external dependency, runtime constraint or local business rule |
OpenAI has published the MultiLangBench setup and test suite. The README says the tests compare output with reference SQLite. It also lists API cost. OpenAI describes its separate COBOL migration test as using hidden cases. It does not say those cases are public. Downloading MultiLangBench alone cannot reproduce the migration score.
What the October 19 results actually say
On MultiLangBench, GPT-6 Astra passed 87.4% of tests on average across 20 languages at maximum reasoning effort. GPT-5.6 Sol averaged 26.8%, according to OpenAI. The COBOL score rose from 10.9% to 72.1%. Fortran rose from 21.4% to 83.5%. Visual Basic rose from 27.5% to 89.4%. These tests build a SQLite-compatible database. They do not translate an existing bank system.
In a separate COBOL migration test, GPT-6.1 Sol reached 86.6% accuracy at low reasoning effort. GPT-5.6 Sol reached 5.4% at the same setting. OpenAI estimates 39% lower API cost for the newer model in that comparison. At higher effort, it reached 97.9% accuracy. The hidden tests require the old and new programs to produce exactly the same output. One risk is fixed-point arithmetic. A model might round a value that COBOL would truncate. The code could look valid yet give a wrong financial result.
These are OpenAI’s own tests and settings, checked on 21 October 2026. They show progress on those tasks. They do not predict your company’s result or prove that a cheaper setting fits every case.
A practical way to evaluate one COBOL migration
Use the model to draft and analyze a possible translation. Engineers who know the old system should decide whether to accept it.
- Choose a bounded program and a reason to change it. Record its callers, files, input formats, outputs and business owner. IBM's modernization overview lists work beyond a language rewrite. It includes integration, data architecture, transaction integrity and security.
- Capture the current behavior before translation. Create examples for ordinary cases, missing records, boundary values and fixed-point arithmetic. Preserve the source program's observed output as the comparison target.
- Ask for a candidate and an explanation of uncertain rules. Give the model the relevant code, copybooks and interface contract. Require it to name ambiguities instead of silently filling them in.
- Run old and new paths on the same cases. Compare outputs exactly where exact parity is required. Log each mismatch with its input, old output and new output. Name the rule owner who will decide whether it is a bug or an intentional change.
- Review the surrounding system before cutover. A passing code-level parity suite does not settle batch timing, I/O or job control. Nor does it settle access control, data conversion or rollback. Microsoft's COBOL migration account describes these nonfunctional dependencies as a reason some modules need redesign rather than direct translation.
This is a suggested test method based on the sources. Xtrusio has not run this test on a customer’s COBOL system. The same care helps in smaller coding tasks. Our guides to checking Claude-written Python and QA automation with Claude Code show ways to review generated code. They also cover test results. In a vendor trial, ask for old and new outputs, plus exceptions, on your own program. A benchmark alone is not enough.
What remains unmeasured for your system
MultiLangBench gives each language the same database interface. That makes its scores easier to compare. It does not recreate a mainframe system. OpenAI’s migration test checks outputs on hidden cases. Your production system may also rely on batch jobs, files, security rules and other interfaces. The linked Microsoft and IBM guides discuss that wider setting.
The new scores do not mean AI can rewrite every COBOL system. They do give teams a reason to test a small, well-defined program. Use your own business rules and dependencies. Let the result of that trial decide the next step.
Frequently asked questions
Can AI modernize COBOL code automatically?
It can assist with analysis and candidate translations, but OpenAI says applying its benchmark progress to production software still requires expert review and tests against real business rules and dependencies.
What does MultiLangBench measure?
It asks a model to build a SQLite-compatible database engine in one of 20 languages. The public test setup compares resulting database behavior with a reference SQLite implementation.
Did OpenAI publish the COBOL migration test suite?
OpenAI announced that it released the MultiLangBench setup and test suite on GitHub. Its article describes the separate COBOL migration evaluation with hidden parity tests; it does not say that this second hidden test suite was released.
Which target languages did the COBOL migration evaluation cover?
OpenAI says its evaluation asked for COBOL migrations to C++, Java, Kotlin, Python or Rust while preserving observable behavior.
Does an 86.6% evaluation score predict our migration success?
No. That is OpenAI's model result on its own task set at low reasoning effort. A team's code, data, runtime and business rules need a separate local acceptance test.
Sources
- OpenAI, “Advancing coding in low-resource programming languages,” 19 October 2026. Evaluation definitions, language scope, reported model results and limitations. Checked 21 October 2026.
- OpenAI MultiLangBench repository and README. Public benchmark setup and test format. Checked 21 October 2026.
- IBM, “What is COBOL modernization?”, updated 6 April 2026. System scope beyond code translation. Checked 21 October 2026.
- Microsoft, “How We Use AI Agents for COBOL Migration and Mainframe Modernization,” 9 July 2025. Practitioner context for dependencies and redesign. Checked 21 October 2026.
Topics
- how to use AI to modernize COBOL code
- COBOL migration evaluation
Xtrusio
AI visibility research
Xtrusio is the Perception Engine for B2B brands.
Free check
See how AI engines answer about you
Get your free AI visibility check
Keep reading
AI Search · 29 October 2026 · 7 min readClaude Code Alternatives: 6 Coding Agents Compared, With Prices
Compare six Claude Code alternatives by price, payment model, setup and best fit, including Codex CLI, Copilot and open-source terminal agents.
AI Search · 29 October 2026 · 7 min readOpenCode vs Claude Code: Setup, Models, Permissions and Cost
Compare OpenCode and Claude Code on setup, model choice, permissions, accounts and current pricing, using each tool's official documentation.
AI Search · 22 October 2026 · 5 min read