Modernizing the Common Language - COBOL
Frumious Wombat writes "Over at the Register Developers section, they are quoting the head of research for Ovum Consulting on the continuing dominance of COBOL in certain business applications. The antique language accounted for 75% of all business transactions last year, and some 90% of financial transactions. For all the time spent arguing the merits of Ruby vs. C#, should the community spend more time building tools to make COBOL livable? The article goes into what it terms 'legacy modernization', and lays out some details on how to go about it. From the article: 'The first stage in the legacy modernization process is to understand the business value embodied within legacy systems. This means that developers must give business domain experts (business analysts) access to the legacy, using tools that help them find their way around it at the business level. Some awareness of, say, COBOL and of the legacy architectures will be helpful but we aren't talking about programmers rooting around in code - modern tools can automate much of this analysis for staff working at a higher level.'"
Modernize? Pah.
Why not just rewrite it in PHP. Another 30 years of guaranteed fat support contracts. Always think of your potential pay-packet.
Because, it makes sense.
You don't have to develop corporate variable naming standards, coding standards, and all that, because the language makes it happen automatically.
You can take a fresh wet behind the ears kid, give him the code, and he can figure out what's going on without any significant trouble, because it happens in order, there is none of this fancy renaming variables on the fly and obfuscating code with magic numbers stuff that is all the rage in C++, Java, and other "modern" languages.
You want to add 2 and 2? Great, you get 4, which is what the accountants want. You can't program 2+2 to equal 27 like you can in C++. One operation does one thing, does it well and accurately, and moves on.
Business only has one real question: "How much money did I make last year?" COBOL provides all the tools to answer it.
That is why COBOL lives, and always will.
Every person I've met with writing talent throws lots of stuff away. They do it without a second thought, and the next attempt is almost always better. Why should writing software be any different? If the legacy is so bad as to be entirely undocumented and filled with back doors, work-arounds and pitfalls, what do you lose by rewriting? It's not like editing the crap code is going to be any faster or less error-prone.
In fact, there's many benefits to rewriting. It allows for proper documentation to be created (design diagrams, use cases, requirements documents) if it was missing. It allows for new technologies to be considered, and to plan for another 30 years of operation. If the software was created using a robust process, the design diagrams, use cases and requirements documents are already written. That's the hard part; any coder worth his salt should be able to exactly duplicate the application from those artifacts.
I don't think the risk is as bad as business types claim it to be. Is it really any more of a risk to "Rip and Replace" when it's at least as likely that either the ancient hardware that the application runs on fails without replacements being available, or that the one person in the entire company who actually knows all the stuff that should be written down in the non-existent documentation retires, and there's no replacement available? The article mentions in 2 of the 3 legacy reclamation techniques that a domain expert would be required. The fact that many of the domain experts are going to be or have already retired should be additional incentive to do the "Rip and Replace" while they're still available.
mandelbr0t
"Please describe the scientific nature of the 'whammy'" - Agent Scully
Help stamp out iliturcy.
Comment removed based on user account deletion
One, these figures result from the simple fact that COBOL was pretty much the only high-level language around at those pre-historic times many of the major applications were written. And banks are very, very conservative environments where something that works will not be thrown away for something that might have bugs, even if it's 10x as fast, easy to maintain or whatever. It has to work and that's priority #1, #2 and #3.
Two, the reason COBOL is so widespread in financial institutions has nothing to do with business sense and everything with business mind. It is "readable" to a business dude with zero computing experience. Something like "ADD PROFITMARGIN TO PRICE" just makes these people feel more at easy than "$price+=$p_margin".
Assorted stuff I do sometimes: Lemuria.org
This simply underlines the fact that there's a huge workload of easy, routine transactions that need to be done.
In terms of total complexity, the financial world is probably something like Excel 20%, C# 15%, Java 30%, C++ 30%, other 5%.
But in terms of transactions, I can well believe it's COBOL 70%, REXX/VB/4GLs 25%, other 5%.
Modelling a CDO *is* hard, and you don't do it in COBOL. Creating a visual system to monitor liquidity *is* hard and you don't do it in COBOL. 'Transactions' pure and simple are not hard... you can do them in COBOL... they're easy to maintain because changes are of the form 'deduct 5% if broker_country_of_incorporation = finland'... and they're also a darn silly way to measure the relevance of a language.
Whence? Hence. Whither? Thither.
...hear my prayer!
But, does this mean that the "community" should help? Why should *I* build such tools, why should *you*? That's the problem of the financial institutes, and they are willing to pay large sums to get their code maintained and modernized in COBOL. And if they want to have a nice development tool, so they have to pay for it (probably indirect by paying a software development enterprise, which creates and then uses such a tool).
Once you guys get jobs in the Real World, you will realize that businesses don't care about technology, they care about solutions.
No business person in their right mind would rewrite all their COBOL code into C or Java just for the sake of modernization. That would be foolish and stupid, and they would deserve to be fired from their jobs. Everything works, why change it. Financial institutions that have their entire livelihood based on these COBOL programs would rather upgrade their hardware and make THAT modern, but keep their legacy code. They already went through a multi-billion dollar fixing for the Y2K industry, that's more than enough for them. The next problem is either 2038 or 2050, when the Y2K issue is revisited because of how most companies implemented their "fix" (any date > 50 would be considered in the 21st century).
I was working at a bank during late 90s and during a building-wide Y2K meeting, one of the project managers was explaining to us how they implemented the solution. Someone in the crowd asked "Won't we go through this problem again in 2050?" He answered "Yes, but I'll be dead then, so I don't care."
That is how business people think... they care about solutions, they don't care about technology. Don't waste your time navel-gazing and trying to figure out brilliant ways of modernization COBOL, because no one who uses it cares. Keep your great ideas for the new ideas where the barrier to implementing new solutions and new technology is much lower.
The reason there is so much legacy code about is because that code has been around for some years, is proven and is bug free.
The slashdot article assumes that because of this the code may benefit from change. In fact the exact opposite is the case. Change introduces bugs and costs money, so I cannot see this happening.
Add MODERNIZATION to COBOL giving (MESS given by ADDITION of (SPORK given by ADDITION of FORK to SPOON) to EYES)
That's the modern version. It woulda taken me three lines to do it the old way.
The antique language accounted for 75% of all business transactions last year, and some 90% of financial transactions. For all the time spent arguing the merits of Ruby vs. C#, should the community spend more time building tools to make COBOL livable? The article goes into what it terms 'legacy modernization', and lays out some details on how to go about it.
I mean, it's only big (huge!) corporations running big back-ends that use COBOL, why should "the community" bother much with that? I doubt it's anyone's itch to scratch. Customers want to run COBOL because the code has had decades of real-world production use, not because of COBOLs merits. If the same people still ran assembler code, I'd trust that too. Doesn't mean I'd like to give up on modern languages because of it. If I heard the words "legacy modernization", I'd think "don't break what works". Doesn't mean big new developments are made in COBOL, they interface it.
I'm almost convinced that COBOL will be running on systems a hundred years from now. Any Turing complete language could produce working code to solve anything (or well, as much as any other Turing complete one, anyway). Clearly there's some such code in COBOL, which it makes no sense to reimplement in another language just for the sake of reimplementing it. But I don't see the benefit of trying to revive COBOL development, there are now much better tools for the job. How long has it been since the term "Completely Obsolete Business Oriented Language" was coined? It's dead, Jim. The only tools needed are those to ease its passing.
Live today, because you never know what tomorrow brings
The big advantage COBOL has is that the language is serious about data storage. The language knows about structured files, databases, indices, and formatted fields. COBOL was the first language to have data structures.
Look at what a mess it is to talk to a database from Perl, Python, Java, or C/C++. There's fussy glue code required, and the language doesn't help you make sure that field XYZ in the database comes out as field XYZ in the program. In COBOL, it's straightforward. The language knows about databases. There's even a good interface to MySQL.
It also has some formatting capabilities that HTML should have had. You can write CREDIT-CARD-NUMBER PICTURE 9999-9999-9999-9999. In some systems, that will eventually result in an input field on a green screen that will only accept four fields of all numbers with all digits filled in and will display a blank form field accordingly. HTML FORM fields should have worked that way.
There are some real advantages to a language where components outside the individual programs can see, check, and use the data declarations.
One such company, Envyr Corporation (makers of iCobol), builds a solid windows-based IDE for COBOL. Their compiler supports many different architectures - AIX on RS/6000, DG/UX on AViiON (though, newer versions aren't supported on this platform), HP-UX on HP Series PA-RISC 1.1, Intel RedHat (above kernel 2.2 for newer releases), SCO (yeah, yeah, I know). They also support the full line of Windows OSes, though older versions like 98, NT and ME only have basic testing performed on them.
They provide tools for transitioning from older Data General COBOL to newer OSes (Windows, RedHat).
Interesting thing also, is they provide a cgi platform for COBOL.
They also provide various APIs for C to interact with the COBOL program you have, services for code migration, etc etc.
The company is run by several ex-Data General employees, and they really know their stuff.
Disclaimer: I do not work for Envyr Corp, but I have family that does.
The company I work for (large fortune 500 company) still uses a lot of cobol on the mainframe for financial transactions. Why use an "ancient" language? Because there is 20-30 years of business knowledge encoded in the cobol code. Not only that, but it is tested, tried, and it just works perfectly. Rewriting in a modern language would make no sense other than using the "latest technology." Rewriting would most certainly introduce bugs which could potentially cost the company millions since it is running financial processes. Cobol was meant for the business and financial world and is well suited for it.
I got nothin'
Sorry but I had to let that one out. "Code that matches my passion." is priceless.
When you start looking at a mortgage payment, car payment, grocery bill, doctor bill, etc. you'll realize that you work on something you can do well. Save your passion for your hobbies. Code on the bleeding edge at home.
Do you honestly expect business to conform to what you want to do instead of what works for them? Answer truly. And if you don't come up with "Heck no!" you need to rethink how it works.
Sure COBOL may not be for you. Good deal. Don't learn it. But if you're applying for a job and they need LegacySystem 5.7 and you tell them you don't know it, won't learn it, but would consider writing in BleedingEdgeSystem 0.54 you can pretty much figure out what the answer is going to be.
I've been coding since 1976. Yes, 1976. I've learned many languages. Some I've liked, some I haven't. But if the business needs it I learn it. Sometimes I learn it just because I want to. I missed out on COBOL (don't ask) but may just add it to my list of things I want to investigate.
I'm not being a troll or at least I'm not trying to be one. Some people will probably read that first exclamation and not go any farther. But sometimes you really do have to wake up and smell yesterday's coffee burning in the pot.
Blasphemy. Rewriting the sacred text of the colonies. Where's Cmdr Adama?
Some drink at the fountain of knowledge. Others just gargle.
Sorry, but I have to rant: Whoever wrote this has no idea what they're talking about.
COBOL is the glue language in a stack of application components sold by IBM including CICS (or ISPF), VSAM, DB2, etc. These are quite modern and up-to-date, and run on the mainframes that make the world go around by providing reliability and uptime at load levels beyond the wildest dreams of PC and Linux users. Sure, anyone could learn COBOL basics in a day or two, but you're not going to learn and certainly not going to "modernize" a COBOL program running against a DB2 database. COBOL is a glue language that glues together high-performance relational database access, high-performance presentation-layer management (CICS makes Windows API programming look simple!), etc to process umpty transactions per second, where umpty is a number beyond the reach of most Linux boxes. You're never going to "modernize" this stuff because it's the only thing around that can do what it does at that throughput level. The COBOL part is just a driver among the different components. Even the business logic has been factored out into stored procedures now.
There is no problem bolting on web access to databases and data warehouses, or stuff like that, but whoever wrote that (imagine that, a consulting group who will come in and modernize everything for you!) has absolutely no idea what COBOL applications are or do. You are most definitely not going to port legacy applications to new platforms that use CICS or ISPF for their presentation layer! Get a clue. And what platform are you going to port your COBOL program to? The mainframe is already the highest end platform of all time - there's nothing with more throughput - I doubt a company would take the notion of porting to MySQL on an Intel box very seriously. The bottom line is people use the IBM application stack because it works, at a performance level where nothing else works.
Sure, it would be fantastic to have an open source COBOL compiler with a MySQL precompiler so people could learn the language (ever tried to parse COBOL!?). And a Mono COBOL compiler would be fantastic. But no one is going to port their mission-critical business applications from a mainframe to a virtual machine runtime environment. You might use C# or Python to create new apps to access the data in new ways, offline, but you're not going to port mission-critical stuff.
Ever chased an else'less IF or a Case where someone forgot to put a "break" in C ?
Ever chased a very subtle bug in C++ where some moron overloaded the wrong operator?
Ever chased an End statement in Pascal where a ; was optional?
Ever chased a ... in any language?
The bottom line is this. Every language has its pluses and minuses. COBAL was designed as a language to handle business operations. It does it well, it does it faithfully and its Proven, Tested, Validated an most of all Trusted (PTVT).
Ask K&R if they think C is a good business operation language, I bet they would reply in the negative.
As to other languages...
The bottom line is COBAL was designed to do exactly what accountants and business need. Its been extended, but the basic functionality that it was designed to do is all still there.
If you don't like the wordiness of COBAL I can understand that, brevity has its place, so go spec a "modern" business transation orineted language, work the bugs out for about 30 years and I am sure banking will adopt it, provided it runs on an IBM Mainframe, since there is simply no way you are gonna handle the transactions on 400 million bank acounts in less then about 6 hours the way BofA or Wells Fargo does, night after night, after night.
Its one thing if your mashup of Perl, Python, Ruby on a rocket sled and javascript all come flying apart and someone cannot read Slashdot for a few hours or someone cannot place an on-line order for a while at Amazon. But just have several thousand ATM's go bonk because the Linux Cluster lost its mind or something like that so that people can't get cash, or make a deposit and see just how fast everyone comes after you with Tar, Feathers and a pitchfork!
Hey KID! Yeah you, get the fuck off my lawn!
can't replace the existing 200 billion lines of code.
Sure you can. A 20 line Perl script would probably work just as well.
And you can't maintain 200 billion lines of COBOL, either.
But seriously, COBOL is so verbose that the 200 billion lines of COBOL could probably be replaced by 100 million lines of C++ or Java. And it would be more maintainable. COBOL exists to keep programmers employed; consider what it provides for the programmer:
MULTIPLY HOURL-WAGE-IN-CENTS TIMES HOURS-LOGGED-FOR-THIS-EMPLOYEE-ONLY-NOT-INCLUDING
ADD TEMPORARY-SALARY-FOR-THIS-WEEK TO ONE-TIME-BONUS-FOR-SALARIED-EMPLOYEES-NOT-RECEIVI
MOVE BY NAME TMP-EMPLOYEE-SALARY-CALCULATION-WORKSHEET-STRUCTU
But I jest, of course. The truth is, most businesses are so afraid of moving away from COBOL that they'd rather continue to shell out premium salaries than take the risk of a failed migration. Kind of like a lot of Windows users - they'd like to try Linux, but are afraid of change. Well, I suppose you get what you deserve.
The society for a thought-free internet welcomes you.
You may be in touch with modern software principles but sadly you are out of touch with business principles. Ideology does not make a company money. And a company is about making money not writing code conforming to modern code design.
To make a business case for code change, you need to back up your reasoning by showing how it will either 1) save the company money within 5 years or less (including paying off all the money spent for the code upgrade which at large companies could run into hundreds of millions of dollars) or 2) earn more money for the company (including paying for the code changes) within 5 years or less. You could argue that these are the same things but I look at them differently as one causes earnings to increase indirectly through savings, and the other directly though increased revenue.
If you can't do either, then forget it. If you don't understand why, think about where your paycheque comes from and how the company is going to be able to afford to pay you to work on no-gain projects. If you don't want to understand why, then stay a coder... not even an analyst, stay a coder. You must justify the costs of these kinds of expenditures. Now it is possible and even likely that someone was able to justify the costs of fixing design issues on projects you worked on. However, in corporate life, wholesale 'fixing' of 30 or 40 year old stable code is not usually justifiable for design sake alone.
For example on on projects I have worked on where large companies have modernized their systems (often replacing Cobol code) it always involved monetary reasons. Many times Cobol systems are built on other Cobol systems, which are built on other Cobol systems... Business domains begin crossing back and forth across system boundaries and things (for example customer service) become a nightmare. Take a customer order management process: Customer wants three things, it might take three systems to order it, two different customer service reps, and if something goes wrong, support has to track things across 3 systems. If you want to create a new product package it takes too much time to coordinate between systems and one or more might need programming changes which might mean data conversions if the interfaces change between the systems, etc. If the pain threshold gets to high by holding back the company in effectively competing because their systems piss the users off, piss the customers off, and hold back introduction of competitive products (in other words, if it is costing them more money keeping the old system than replacing it will cost), then they will consider replacing the old systems.
Since we are talking Cobol and financial transactions, we are talking *mostly* about the corporate world. When you are talking about large corporations, the cost to replace even an ordering and billing system can run well into the hundred million dollar range or more. Tens of millions is not uncommon either. Projects in the million dollar range are a dime a dozen in the corporate world.
Note: I don't particularly like Cobol... actually I don't like it period (I like C/C++/Java syntax better because I understadn it :-). But for me to justify something to a customer, it must solve a customers problem. The first thing to remember is their main problem is how to make more money. Period. It is not about supporting good code design. They could have something in place that was the worst coding job in the history of the planet, but if it makes them money it won't matter. Unless of course you can show them in concrete terms that a good design will pay for itself by directly or indirectly making them more money.
-- I ignore anonymous replies to my comments and postings.
... I can program in C/C++, Pascal/Delphi, Java, VB/Basic, Perl, a bit of Ruby, Python, and several shell scripting languages/applications like sed/awk. I find cobol to be the most obnoxious pain in the ass language I've ever used. I had to take two semesters of it in college and I hate it. I hate it just like I hate RPG. They're underpowered, obnoxious, and annoying to work with. Screw cobol, screw rpg. I'd sooner bag groceries than program in either language.
Shadus