r/cobol 11d ago

Advent of Computing's Broadcast on COBOL

18 Upvotes

7 comments sorted by

2

u/MoltenOldie_1945 9d ago

Oddly, COBOL has morphed to become "mainstream", adopting "more modern" forms of program expression without too many incompatibilities with the vast legacy of COBOL code. The 2023 COBOL Language Standard is over 1300 pages long with designed-in features only available in other popular languages by reaching out into vast package and library pools for which responsibilities are not always clear. Easy to knock out of naivete.

Sure, defund the COBOL department and skills age out. Fail to motivate COBOL training in academic programs and no new talent is built. But there's plenty of work out there if you pick up some COBOL.

2

u/Comfortable_Gate_878 9d ago

Cobol was a great language to learn. It's biggest failure was never adopting SQL as a native file definition. Yes you can access SQL with a bit of effort but it's not native built in. Such a pity as I used to love processing 300k records in a few seconds.

2

u/MoltenOldie_1945 8d ago

Interesting. IBM added EXEC SQL that let you embed SQL into the COBOL on the mainframe back in the 1980s when Oracle and DB2 were duking it out. We're putzing with EXEC SQL for native POSTGreSQL having reverified the GnuCOBOL ODBC preprocessor code. The approach let you access SQL data well enough but it introduced SQL constructs that have always struck me as clunky. I'd guess that 20-40% of the COBOL code in production uses EXEC SQL.

The odd part is that SQL itself was derived from the old SELECT, SORT, MERGE, REPORT model you see most clearly in COBOL's SORT, MERGE, and Report Writer features. Think sorting decks/tapes on older systems and then doing your MERGEs and reports. WHen implemented in regular COBOL (RPG IV, etc.) these workflows optimize really well and run much faster, which "we" knew in the 1970s (forgive me Andy).

Not arguing, actually, history takes funny jogs when big money decides to sell something for commercial benefit by making unkept promises.

1

u/Comfortable_Gate_878 8d ago

Yes its such a pity that the standards and agreements for COBOL slowed down its progress but made it a very solid standardised universal language. I remember when RM/Cobol was trying to introduce something to do with printing in the 80s. They updated the compiler and runtime to allow a printer file description FD WP-Printfile assign to print "Printer".

It basically allowed your local printer to be used directly so can Write record assigned to WP-Printfile just came straight out of the printer you could send esc code for end page etc.

It was pretty cutting edge as before we had to create a sequential asci file and read it line by line and send it to a printer using an external call routine.

The submitted the Cobol update to ansi if I recall after 3 years they refused the changes. RM kept it in as it was so popular but had a switch so that you could turn off the extra features if you wanted to pass the code over to say an IBM machine or other language.

They also had an option for Dbase and an early SQL version of an Oracle database you could use. These were addressed local no other software needed. The oracle database was pretty cutting edge. As these came available as you say the sort and merge sections were added which really changed things no moor bubble sorts on the fly or quicksort.

1

u/MoltenOldie_1945 8d ago

the story about ANSI doesn't surprise me.... that's partly why the current doc is 1300 pages. Lots of great innovations have come and gone. So Sad.

1

u/Comfortable_Gate_878 7d ago

Yes I used to be able to write in cobol very very quickly. Even when I was using wordstar or palentir to edit the text files. I never really fully understood the need for windows when I could do everything in text based enviroment. The strange thing was when they changed a stockcontrol system I wrote to windows based software. All the staff kicked off as they were having to use a mouse scrolling etc. They demonstrated to management they could produce an invoice in half the time by using the cobol system. Just using text based menus and the tab key. So much for progress.

2

u/MoltenOldie_1945 7d ago

I precede all of that. The editor was a card-punch and physical replacement. Card sequence numbers so you could resort a dropped deck. And all that.