logoalt Hacker News

lp4v4n • yesterday at 4:54 PM • 6 replies • view on HN

Can anyone who knows the mainframe domain explain why legacy COBOL applications are not being aggressively ported to modern java applications? It sounds like an obvious usage of AI to solve a real world problem and yet I barely hear about it.


Replies

qak-qskj • yesterday at 4:59 PM

There is no problem. If the COBOL code is stable and works, it works.

You would introduce new problems.

➕ show 1 reply
Delk • yesterday at 9:24 PM

Why do you think they haven't been rewritten before?

The code that's still in COBOL is likely mission-critical and must run exactly correctly. The processes it implements are also probably complex enough (e.g. due to the number of workflows and their special cases) that the code is exceptionally difficult or risky to rewrite.

Even if the amount of labour required to produce the bulk of the code could be cut significantly with LLMs, maintaining correctness (or verifying it) doesn't become trivial.

You can't vibe the kinds of applications that still run in COBOL.

andsoitis • yesterday at 5:55 PM

> It sounds like an obvious usage of AI to solve a real world problem

what is the problem that warrants solving?

➕ show 1 reply
trollbridge • yesterday at 5:33 PM

Because Java is much legacy technical debt as COBOL.

➕ show 1 reply
natas • yesterday at 5:06 PM

You're asking how a watch works!

The truth is that COBOL, particularly on IBM System/390 and z/Architecture, has some rather unusual data representations and capabilities.

For example, PIC 9(18) DISPLAY occupies 144 bits! There are also packed-decimal representations (COMP-3), native decimal arithmetic supported directly by the processor, and other specialized representations. Modern Enterprise COBOL even supports decimal fields of up to 31 digits.

These aren't necessarily exclusive to COBOL or IBM hardware, but the combination of language features, hardware support, and ecosystem integration makes the environment quite distinctive.

And then there's the ecosystem itself. I'm going to keep this deliberately vague for simplicity, but imagine an airline or a bank with millions of lines of COBOL, deeply integrated with databases, transaction processing, messaging, batch systems, and decades of accumulated business logic.

Porting that isn't simply a matter of translating source code. You have to preserve behavior, data representations, transaction semantics, and integrations. Verification alone would be an enormous undertaking. You really don't want to accidentally introduce a rounding error into a banking system or break an airline's reservation system.

Much of this software is also extremely close to the underlying hardware and operating environment. That's part of what makes these systems so difficult to replace.

➕ show 1 reply
aiagentpro • yesterday at 7:35 PM

[dead]