Comment by retrac

5 years ago

It can be automatically translated. But then all you've done is convert a bunch of IF A < B THEN GO TO STEPTWO into if (a < b) { goto steptwo; }

And with a lot of extra unreadable stuff to support things COBOL does but the target language doesn't.

The biggest problem with COBOL codebases is that COBOL (at least back in the day) doesn't offer much in the way of structured programming or standard libraries. Horrifying spaghetti code with one-off local solutions for common tasks is the norm, especially on some ancient endlessly patched code.

Not true, COBOL has as much structure as any other language, if the programmers wrote their code that way.

The main problem with a direct conversion is COBOL has database operations in the language, mapping data directly to variables (records). All modern languages you might translate COBOL to use libraries to perform database operations, and may not even have an off-the-shelf implementation of the pre-relational data structures COBOL was originally designed to work with.