COBOL and Fortran: How Well OpenAI’s New Models Handle Legacy Code

Bildschirm mit Programmcode in grüner Schrift auf dunklem Hintergrund
Photo by Chris Ried on Unsplash

On October 19, OpenAI unveiled two new tests that measure how well language models cope with rarely trained programming languages such as COBOL, Fortran and Visual Basic. Its latest models score far above their predecessors. This is more than a benchmark story: banks, insurers, government agencies and weather models run on these languages, and the people who still understand the code are getting fewer.

Key takeaways

  • In the new MultiLangBench test, a model rebuilds a SQLite-compatible database in 20 languages. GPT-6 Astra passes 87.4 percent of tests on average, while GPT-5.6 Sol managed 26.8 percent.
  • COBOL remains the hardest language: Astra climbs from 10.9 to 72.1 percent there.
  • When translating COBOL programs into modern languages, GPT-6.1 Sol reaches 86.6 percent at low reasoning effort and 97.9 percent at higher effort, compared with 5.4 percent for its predecessor.
  • MultiLangBench is openly available on GitHub, but all the numbers come from OpenAI itself.
  • For real migrations, even OpenAI still calls for expert review and testing against a company’s own business rules.

Why old languages are hard for AI

Language models learn to program from publicly available code. There is a huge amount of it for Python and JavaScript, and hardly any for COBOL: those programs have run for decades behind closed doors in the data centers of banks and government agencies. That is why OpenAI calls them low-resource languages. Their importance stands in stark contrast. OpenAI cites IBM figures showing that COBOL underpins more than 40 percent of online banking systems, 80 percent of in-person card payments and 95 percent of ATM transactions. Fortran does the math behind weather forecasts and nuclear reactor safety analyses.

Every IT department that maintains such systems knows the problem. The documentation has gaps, the original developers retired long ago, and key business rules live only in the code. Earlier coding models were of little help here, as OpenAI itself admits, citing feedback from enterprise customers.

What the two tests measure

MultiLangBench sets a demanding long-running task. The model has to write a database engine in a given language that behaves like SQLite version 3.40.1. It gets only the documentation and no internet access, and every existing copy of SQLite is removed from the test machine. Grading uses tests from the official SQLite test collection. According to the repository, about 24,000 of the 51,000 original tests could be converted into the required format, and the standard evaluation uses 272 of them. Because the results are stored as a database file, the same tests run regardless of language, whether C, Rust, Fortran or COBOL.

The numbers for GPT-6 Astra at maximum reasoning effort: an average of 87.4 percent of tests passed, and above 83 percent in 19 of 20 languages. Fortran jumps from 21.4 to 83.5 percent, Visual Basic from 27.5 to 89.4 percent and OCaml from 25.6 to 85.8 percent. The cheaper GPT-6 Luna reaches 40.3 percent. That is far lower, but it still beats GPT-5.6 Sol in every language and costs an estimated $0.77 per attempt instead of $3.48, about 78 percent less.

The second test is closer to real-world work. The model has to translate COBOL programs into C++, Java, Kotlin, Python or Rust without changing how they behave. Hidden tests require byte-for-byte identical output, and a migration counts only if every test passes. OpenAI gives a typical example of the pitfalls: COBOL’s fixed-point arithmetic truncates extra decimal places instead of rounding them. A rewrite that rounds runs without errors and still produces different dollar amounts. GPT-6.1 Sol handles 86.6 percent of the programs at low reasoning effort, while GPT-5.6 Sol manages 5.4 percent with the same setting. It does so at only 61 percent of the previous API cost. With more reasoning effort, Sol reaches 97.9 percent, close to the test’s maximum.

Where the numbers hit their limits

OpenAI designed and scored both tests itself. So far, only MultiLangBench can be checked publicly: its setup and test collection are on GitHub under the Apache 2.0 license. OpenAI does not point to any published code for the migration test. An analysis by TechTimes notes that real COBOL environments consist of more than individual programs. They include shared data definitions known as copybooks, batch jobs written in JCL and transaction systems such as CICS. The test says nothing about how well the models handle that web of dependencies.

OpenAI itself puts it cautiously: for software in production, expert review and testing against the system’s business rules and dependencies are still required. That the topic carries real weight became clear in February. When Anthropic wrote at the time that Claude Code could take over much of the analysis work in COBOL migrations, IBM’s stock fell about 13 percent in a single day, as heise reported. IBM, Accenture and other service firms earn a great deal of money from exactly this kind of modernization work.

What teams with legacy systems can do now

OpenAI offers the models through its API and explicitly invites teams to try them on their own languages. The most sensible starting point is not a big migration but understanding: having a model explain existing programs, write out business rules and fill in missing documentation. Anyone planning a migration should first build their own test suite that captures today’s behavior, including edge cases such as rounding, empty records and date formats. That principle, success only with byte-identical output, is exactly what makes OpenAI’s test meaningful, and it carries over to your own projects. How much results also depend on the way instructions are written is something we showed when we looked at why old prompts slow down GPT-6 Astra.

The remarkable part of the announcement is the gap to the previous generation. A model that correctly translates 5.4 percent of COBOL programs is useless; one that manages 86.6 percent at a lower price is a serious tool. For banks and government agencies, the question shifts. Until now, the hurdle was finding anyone at all who could read the old code. From here on, it will be whether their own test coverage is good enough to trust a machine translation. Those who do that homework now stand to gain the most from the next generations of models.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top