A lot of this code was written before meaningful computer networks existed. Records were committed nightly to tape banks. System limitations meant that a lot of unusual situations were handled with special magic values. Like imagines the norm of returning -1 to represent an error but all over the place and stored in databases. I'm sure that some of this was avoidable, but a lot of it was natural just given that codebase is so old.
This is how you get things like Musk saying that there are a gazillion 140 year olds receiving payments and that this must be fraud when actually this is a special data case. So what happens when the codebase is rewritten to be "simple?" Those people stop receiving payments because the special case handling gets lost. All that data consistency code that exists to handle the fact that a bunch of systems don't perform atomic global updates? Lost. Oops, rows just randomly get dropped now.
We can argue about the merits of LLM-driven programming, but it should be very obvious to everybody that "rewrite the social security codebase in a month with AI" is not well suited for these tools today and requires an incredible amount of arrogance to pursue. The annoying new hire who looks at the codebase, declares that it is messy, and demands to rewrite it but x1000.
There were successful efforts to translate it to Java, already underway (CADE-2). They were probably going to finish somewhere in the next two years. The efforts were for bit-for-bit identical reproductions. [0]
An AI will not help you here. Because this little piece of assembly was created for mainframes, not for computers today (AS/400s, I believe). Even the concept of paths don't operate the way systems do today - the drives were direct access, and tape-based.
There is not enough material to train a model on, to make it close to accurate.
[0] https://federalnewsnetwork.com/tom-temin-commentary/2020/10/...
https://www.forbes.com/sites/andrewleahey/2024/09/06/from-co...
It seems more than a little silly to try to rewrite something when it isn't necessary since it has already been done. And that goes double if the goal is efficiency since it cost money to do something that doesn't need to be done.