The Register® — Biting the hand that feeds IT

Feeds

COBOL thwarts California's Governator

Inspite - or perhaps because - of its "difficult" birth, Common Business Oriented Language (COBOL) has become a survivor in the world of computing. That's caused problems when it comes to maintaining systems running the language. COBOL has now taken center stage in the rumbling controversy over the State of California's budget. …

This topic is closed for new posts.

Page:

@wayne tavitt

Isn't that the point?..

Anonymous Coward
Boffin

@Steve Welsh

I'll point out that my c code is generally as readable a what little COBOL I have seen. It just requires the programmer to be intelligent, put in comments as they write the code and give sensible names to variables, functions etc. I'm very sure a bad programmer could write incomprehensible COBOL just as easily as incomprehensible C...

Boffin

The mother of us all

Before COBOL there was assembler. It was a bottleneck. I haven't written COBOL for more than 20 years, but it was a fine language for generating correct IBM or Univac Assembler (not the most efficient, but machines even then were faster than people in generating code). The data areas were accessible in dumps and debuggers (when we had them). Structured programming and extensive documentation of PERFORM A through A-EXIT subroutines gave COBOL some of the advantages of object-oriented programming without the disadvantages (the data remained in the "main"). Calls to separately compiled modules enabled reduction of single load size, while providing the easy maintainability of common code and parameters. Finally, IBM's CICS provided the event-oriented environment later seen when event-driven windowing was added to the various PC-type operating systems; it also anticipated the Web front end by off-loading the user interaction to a specialized front end management system.

The side effect of mainframe implementation is that there was just one operating system and executable application to be maintained. Once tested on the Test System (we always had one), the code could be moved to production with some amount of confidence. Yes, it was slow to happen -- nobody wanted to mess up the current system. But stability was greatly enhanced, most of the time. Operating system changes occasionally caused problems, as did new versions of the compiler. One advantage was that we all used the same language and environment and could share our experiences without the fragmentation currently experienced.

So this was not "dinosaur" stuff in the sense of lumbering extinct beasts. This was and is a parallel universe of software and hardware, as reliable as the birds who are the descendants of those dinosaurs.

It wouldn't kill any of you to learn and appreciate COBOL as yet another tool, another compiler. CICS is much harder, of course; it's hard to describe, somewhere between Windows and Web programming. And database calls are in there too -- it isn't all ISAM, or tape.

Re: Decreasing Salaries?

"The problem isn't simply decreasing salaries; the problem is calculating back pay and taxes on said back pay after reinstating everyone's salary in the future. The code to handle that scenario simply isn't there. Doing it all by hand is obviously not realistic."

Then the system was bad to start with.

I've seen systems, designed in the late 70s and finished in the (very) early 80s (ok, they're not quite 30 years old) that could do things like this without a hickup.They were explicitly designed to do things like that. If an employer finds out, that he'smade a mistake and "underpaid" his employes for the last 3 years would have a serious issue rectifying this problem. A good payroll system will "notice" backdated salary changes, recalculate EVERY payroll cycle (sure it'll take some time to do) and come up with a pay slip that contains all the changes and adjustments, incl. tax, pension payments, health care and whatnot.

Anonymous Coward
Anonymous Coward

I like COBOL

COBOL is a cool language. A bit wordy at times, sure thing, but the wordiness has its advantages too. Look at a completely undocumented piece of C code, somethink like 2K loc, and then look at some COBOL code that does the same thing. Now which of them do you think is easier to understand? Of course it is a pain in the neck to

Most people who bad mouth COBOL base their "criticism" on hearsay and things that have been eliminated since COBOL 85, in some instances even COB 74. The bad reputation of COBOL is almost solely based on the Y2K problem, the reasons for which have been pointed out numerous times here. Guess what, take a look at how many UNIX systems are ready for the "UNIX date" issue? Well? It also stems from a time, where people simply didn't realise their ideas might be used way beyond the "expected" lifecycle. Hey, come on, Windows 95 even crapped out, because there suddenly were CPUs that could do things faster than expected (AMD K2 "issue"). Mistakes were made througout the entire industry and some even after people should have realised they were wrong.

A "nice" annecdote: Back in 1990 or so, we started writing a business application in COBOL. In the very early stages of development, I suggested to my then supervisor, that we make all date fields 8 instead of 6 digits. His answer was: "Y2K is 10 years away. Nobody will use this software by then!". Needless to say, the softwarewas canned by the end of 1999 because it was way too expensive to make it Y2K compliant and all clients using the software were left in the rain. All Y2K was, was shortsight on behalf of those, who should have known better.

You can do (almost) anything in COBOL. IIRC the Micro Focus COBOL compiler was mostly written in COBOL...well, I wouldn't go that far, but a solid business app, I would write in COBOL. Even today. Why? Because COBOL was made for it, because I can't recall buffer overflows in COBOL apps, because they don't crap out. How many of your C, C++, C#, JAVA, VB, Delphi and who knows what programs, will still run in 10, 20, 30 or even 40 years? Well?

All languages have their pros and cons and some are better for certain purposes than others. Would I want banks to run systems written in C? No thanks, not with my money involved. One buffer overflow, all gone!

Anonymous Coward
Anonymous Coward

incomplete info

Setting aside the "replace COBOL" foolishness in this thread, the actual business problem here is much more complicated than the article suggests.

1) There are over 200k employees, which puts the State of California into rare company. Your crappy little payroll system, designed to work for small businesses? Yeah, not going to cut it in the big leagues. (There are fewer than 20 companies on Forbes list with this many or more employees.)

2) This is not a pay cut. Repeat that after me: "this is not a pay cut." This is pay deferrment - the system needs to calculate their pay, but only deliver the equivalent of federal minimum wage, tracking how much of the rest will be backpay after the budget passes.

3) This is not an across-the-board change. Certain categories of employees are exempt, certain categories are receiving no pay at all (appointees, certain types of professionals, etc.). These categories are somewhat arbitrary, and do not currently exist in the payroll system (or anywhere else).

4) The $30M? Not only was there a typo of a few orders of magnitude, but that was not to replace this system, but a 'similar' system. Don't know what it would take to replace the state's payroll system, but, having worked on other large-scale systems, I'm pretty sure that it would be a multi-million dollar system. The complexity of the system reflects the complexity of the state's payroll - thousands of employees, multiple unions, different types of 401k plans, etc.

Talking about how easy you think this would be doesn't make you sound like a 'real programmer' - it makes you sound like a kid with no experience working on large projects.

Heart

if its was

If COBOL was a car it would be a old series 3 Landrover.

Fun to use for a while but not every day.

Very bullet proof but not much power.

People smile when they see it.

Very nice examples cost money.

Page:

This topic is closed for new posts.