On this pageKey takeaways

How to Use AI to Modernize COBOL Code: What OpenAI's New Tests Show

GauravXtrusio6 min read

Short answer

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 19 October 2026 research release shows better scores on two coding tests. Neither score tells you whether your own system is safe to switch.

Human engineer studying legacy code migration at a computer
Photo illustration by Xtrusio. Conceptual scene, not a screenshot of OpenAI's evaluation.

Key takeaways

  • OpenAI's 19 October release reports two different evaluations: a 20-language software-building benchmark and a separate COBOL behavior-preserving migration test.
  • On MultiLangBench, GPT-6 Astra averaged 87.4% test pass rate versus 26.8% for GPT-5.6 Sol, under the reported evaluation settings.
  • On OpenAI's COBOL migration evaluation, GPT-6.1 Sol reached 86.6% accuracy at low reasoning effort versus 5.4% for GPT-5.6 Sol.
  • The migration score demands exact observable-output parity on hidden tests; it does not cover every production dependency or business rule.
  • Start with one bounded program, document the rule and output contract, and require expert review plus regression tests before cutover.

Two evaluations, not one modernization score

OpenAI's two evaluations
OpenAI evaluationTaskPass conditionWhat it does not establish
MultiLangBenchBuild a SQLite-compatible database engine in one of 20 languages, per OpenAI’s 19 October 2026 release.Run a SQL query on an input database. Reference SQLite tests the resulting database.Whether an existing enterprise COBOL system can be migrated.
COBOL migration evaluationConvert an existing COBOL program to one of 5 targets: C++, Java, Kotlin, Python or Rust, per the same release.Pass every hidden test with byte-for-byte matching observable outputs.Whether the candidate handles your dependencies, runtime constraints and local business rules.
MultiLangBench
Task
Build a SQLite-compatible database engine in one of 20 languages, per OpenAI’s 19 October 2026 release.
Pass condition
Run a SQL query on an input database. Reference SQLite tests the resulting database.
What it does not establish
Whether an existing enterprise COBOL system can be migrated.
COBOL migration evaluation
Task
Convert an existing COBOL program to one of 5 targets: C++, Java, Kotlin, Python or Rust, per the same release.
Pass condition
Pass every hidden test with byte-for-byte matching observable outputs.
What it does not establish
Whether the candidate handles your dependencies, runtime constraints and local business rules.

COBOL, Fortran and Visual Basic have less code and documentation available for model training than Python or JavaScript. OpenAI tested two skills that matter for those languages: writing new software and preserving how existing software behaves. Read the scores separately because each measures a different task.

OpenAI’s public MultiLangBench README uses SQLite 3.40.1, which SQLite released on 28 December 2022. The README tracks both test pass rate and API cost. It describes a 272-test subset, a pool of about 24,000 converted tests and a 60-second timeout. That subset is about 1.13% of the converted pool (272 ÷ 24,000 × 100 ≈ 1.13%). The public repository covers the database benchmark. OpenAI’s release describes the separate migration tests as hidden and announces only the release of the database benchmark suite.

Check: Compare the public MultiLangBench README with OpenAI’s migration methodology. Pass if you can identify the reference database test and the separate hidden output comparison. Red flag: A vendor presents a database-building score as proof that it migrated a COBOL application.

What the October 19 results actually say

COBOL migration evaluation, per OpenAI
Model and settingAccuracyAPI cost in the 19 October 2026 release
GPT-5.6 Sol, low effort
5.4%
Baseline for the low-effort comparison
GPT-6.1 Sol, low effort
86.6%
61% of baseline API cost, a 39% reduction
GPT-6.1 Sol, higher effort
97.9%
No higher-effort price in the release

In OpenAI’s migration test, a translated program counted as a success only if every hidden test passed. The outputs had to match byte for byte. COBOL fixed-point arithmetic can discard extra decimal digits unless the program requests rounding. A rewrite that rounds those digits can compile and run while changing a financial result.

MultiLangBench test pass rate, per OpenAI
LanguageGPT-5.6 SolGPT-6 LunaGPT-6 Astra
COBOL
10.9%
17.1%
72.1%
OCaml
25.6%
34.1%
85.8%
Fortran
21.4%
31.4%
83.5%
Visual Basic
27.5%
41.6%
89.4%
Average, 20 languages
26.8%
40.3%
87.4%
COBOL
10.9%
GPT-6 Luna
17.1%
GPT-6 Astra
72.1%
OCaml
25.6%
GPT-6 Luna
34.1%
GPT-6 Astra
85.8%
Fortran
21.4%
GPT-6 Luna
31.4%
GPT-6 Astra
83.5%
Visual Basic
27.5%
GPT-6 Luna
41.6%
GPT-6 Astra
89.4%
Average, 20 languages
26.8%
GPT-6 Luna
40.3%
GPT-6 Astra
87.4%

OpenAI’s 19 October 2026 release gives these MultiLangBench results at the stated benchmark settings, with GPT-6 Astra and GPT-6 Luna at maximum reasoning effort. Astra scored above 83% in 19 of the 20 languages. COBOL remained its hardest language.

On 25 October 2026, we ranked 12 published MultiLangBench scores within the four languages detailed by OpenAI and found that COBOL scored lowest for all three models in that group.

On 25 October 2026, we calculated 12 same-language gaps between model pairs from OpenAI’s published scores and found that the largest was Astra’s 62.1-percentage-point lead over GPT-5.6 Sol on Fortran.

These are OpenAI’s own results. The 27 November 2026 search found no independent replication. Online Tech Tips wrote on 24 October that outsiders could not verify the figures. A second-hand account of The Verge’s 26 October coverage described academic criticism of the evaluations and attributed to OpenAI a caution that legacy-code migration remains unsolved. For a production decision, use expert review and tests of your own rules and dependencies.

Check: Compare the two benchmark tables with the results in OpenAI’s release. Pass if each number is tied to its task and model setting. Red flag: The higher-effort migration score is presented as a production success rate or paired with the low-effort cost.

A practical way to evaluate one COBOL migration

Start with one bounded program. Record what it does, capture its output before you change it and use AI to draft the translation. Give a COBOL engineer and the business rule owner the evidence they need to accept or reject the draft.

  1. 1 Pick a program with a clear boundary. Record the reason for changing it, its callers and its files. Write down the input formats, output contract and business owner.
  2. 2 Save the original outputs. Run ordinary cases, missing records, boundary values and fixed-point arithmetic cases. Keep the input and the observed output for every case. Reserve cases that the model will never see during translation.
  3. 3 Ask for a candidate and a list of uncertainties. Give the model the relevant source code, copybooks and interface contract. Ask it to identify ambiguous rules and explain where the candidate implements each one.
  4. 4 Replay the same cases against both versions. Compare bytes where the contract requires exact output. For each difference, log the input, old output, new output and rule owner. Have the owner distinguish defects from approved rule changes.
  5. 5 Rehearse cutover and rollback. Check batch timing, I/O and job control. Verify access controls and data conversion. Record the conditions that trigger a rollback and rehearse restoring the old path.

IBM’s 6 April 2026 overview describes 4 modernization routes, including keeping COBOL behind an API and refactoring it. It also identifies integration, data architecture, transaction integrity and security as part of the work. Microsoft’s 9 July 2025 account describes Bankdata as serving 8 member banks. Bankdata still had more than 70 million lines of mainframe code in that account. Its experience illustrates why batch throughput, I/O, job orchestration and service commitments can force a redesign.

This pilot is a suggested method based on the sources. Xtrusio has not run it on a customer’s COBOL system. For related examples of reviewing generated code and test results, see our guides to checking Claude-written Python and QA automation with Claude Code. Ask vendors to return the same evidence for your pilot program: both sets of outputs and a log of every exception.

Check: Run the original program and the candidate on the same held-back inputs, then rehearse rollback. Pass if required outputs match exactly, rule owners sign off on any intentional changes and the old path can be restored. Red flag: The candidate passes the examples shown to the model but rounds a value the original truncates.

What remains unmeasured for your system

What to price and prove before switching
DecisionCost to estimateEvidence to request
Use AI to draft a translationModel calls, retries and engineer reviewActual API spend and review hours for the pilot program
Accept the candidate’s business logicRegression cases, reconciliations and fixesOld and new outputs for the same cases, a record of differences and rule-owner approval
Move the workloadIntegration, data conversion, runtime, parallel operation and rollbackA timed batch run, file and interface checks, access-control results and a rollback rehearsal

OpenAI’s 19 October 2026 release estimates an average MultiLangBench API cost of $0.77 per sample for GPT-6 Luna and $3.48 for GPT-5.6 Sol. The difference is $3.48 − $0.77 = $2.71 per benchmark sample, about 78% lower. Those are prices for the database-building benchmark samples. For the separate migration evaluation, OpenAI gives a relative low-effort API cost and a higher-effort accuracy of 97.9%. To budget a migration, add your measured pilot API spend to the cost of review, testing, integration and running both paths through cutover.

MultiLangBench gives each language the same database interface, which makes the results comparable. Your mainframe can add file dependencies, job sequencing, access rules and external interfaces. Microsoft’s 9 July 2025 Bankdata account puts the scale in context: its members served more than 30% of the Danish banking market. IBM’s 6 April 2026 modernization overview explains why integration, transaction integrity and security need their own checks.

A model can draft a conversion. Trust the resulting code once your engineers and business owners have reviewed the rules and the candidate has passed the checks for your workload. Start with one well-defined program and use the pilot evidence to choose whether to expand, redesign or leave that workload in place.

Check: Add the pilot’s actual API spend, staff time and operating costs, then compare both runs against your acceptance criteria. Pass if the estimate includes parallel operation and the candidate meets the agreed output and runtime requirements. Red flag: The estimate covers model calls alone or assumes that output parity proves the batch will finish on time.

Frequently asked questions

Can AI modernize COBOL code automatically?

In our view a model can help with analysis and candidate translations. 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 released the MultiLangBench setup and test suite on GitHub. Its article describes the separate COBOL migration evaluation with hidden parity tests; we found no statement that this second 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.

Topics

  • How to Use AI to Modernize COBOL Code

Gaurav

AI visibility research at Xtrusio, Xtrusio

Xtrusio is the Perception Engine for B2B brands.

Free check

See how AI engines answer about you

Get your free AI visibility check

Talk to us about the managed plan (free trial)