Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I think I heard on a previous StackOverflow podcast that COBOL was used as the programming language for traffic lights (or something like that), so this got me interested. I did a quick Google search and found this little article:

Today, Cobol is everywhere, yet largely unheard of by millions of people who interact with it daily when using the ATM, stopping at traffic lights or buying a product online.

The statistics on Cobol attest to its huge influence on the business world: There are over 220 billion lines of Cobol in existence, a figure which equates to about 80 per cent of the world’s actively used code. There over a million Cobol programmers in the world. There are 200 times as many Cobol transactions that take place each day than Google searches.

I didn't really trust the source seeing as how it's on some random PHPBB forum. So how accurate are these figures? Are there really 220 billion lines of COBOL? I assume a few people/companies still use COBOL, but how many?

share|improve this question

closed as not constructive by gnat, Kilian Foth, Martijn Pieters, GlenH7, ChrisF Feb 14 '13 at 12:17

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

3  
I work for a company that has tens of millions of lines of code written in COBOL. –  dan04 Feb 9 '11 at 8:05
8  
COBOL is still the language of choice for mainframe applications. Think of how many COBOL programmers are in the Fortune 500 alone. –  Walter Feb 9 '11 at 12:12
1  
@dan04 you cannot count code as lines. I could, in fact take a big project like the Linux kernel, preprocess it and remove all newlines. 1 line! Count in expressions and statements, not lines. –  rightfold Feb 9 '11 at 23:54
1  
@rwong, Cobol is really great for moving data in chunks and adding numbers. This is what businesses need. –  user1249 Jul 6 '11 at 8:55
1  
I studied COBOL at college many years ago. I never recovered. The way I remember it, it was a heavily database oriented language. Lots of support for sequential access, because of tape-based storage etc. I think of it now as a kind of incredibly verbose predecessor of dBase (as in Clipper etc). In database terms, it was pretty low level (specifying the layout of files in a lot of detail), but for imperative programming it was just really really long-winded. move ... to ... may superficially look a bit assembler, but in COBOL terms it's no more low level that ... := .... –  Steve314 Jul 8 '11 at 15:22
show 4 more comments

15 Answers 15

Surely this is the time to get into COBOL programming. Without wanting to offend the more "mature" members of the stackexchange community, all of the infrastructure around banking, traffic lights and ATMs were created when they were cutting edge technology (1970's/1980's). The people who created these systems will now be retiring at a fast rate, so there might be money to be made in maintaining these systems when they do retire.

Ching ching :¬)

share|improve this answer
2  
Most of these systems get replaced as/when the people are ready to retire. At least that's how it works everywhere I've been. –  CaffGeek Feb 9 '11 at 15:07
6  
@Chad Yeah, that's why we get all new fancy state-of-the-art systems that fail. :) –  MetalMikester Feb 9 '11 at 20:18
    
@MetalMikester, very true. –  CaffGeek Feb 9 '11 at 20:25
    
This is very true. The largest project we have undertaken was modernizing such a system. –  user1249 Jul 6 '11 at 8:57
    
+1 for @MetalMikester. COBOL is still broadly used because it IS working. Why change the whole core of a banking system? Think of how long this migration process could take and the risks in case it fail. I've seen several layers being applied over COBOL... but the core, remains COBOL. –  Tiago Cardoso Jul 6 '11 at 11:50
show 3 more comments

Is that a million programmers actively programming in COBOL, or a million non-retired programmers that know COBOL? Pretty much anyone that started programming before 2000 (and went through a CS program) would have learned COBOL and have at least some level of experience with it.

share|improve this answer
2  
My guess is that everyone who wrote something in COBOL at any time in their life got counted in that statistic. –  Tangurena Feb 9 '11 at 14:36
5  
2000? Maybe where you live. Around here I'd say 1990 - 1995 at most. –  Mchl Jul 6 '11 at 9:29
3  
-1: 2000? More like 1970s. –  vartec Jul 6 '11 at 9:52
1  
yes, 2000. Everyone starting in the mid-late 1990s got shoved into Y2K projects, most of them involving Cobol systems. –  jwenting Jul 6 '11 at 11:07
1  
@vartec: It all depends on what path your career has taken. For example, I started college in 2000. If I had started 1 semester sooner I would have been REQUIRED to take 2 COBOL classes. Just because someone who programmed in the 80's hasn't met any COBOL programmers doesn't mean that is the full truth. I worked actively with COBOL programmers on necessary systems for the corporation as recently as 2007. –  James P. Wright Jul 7 '11 at 17:34
show 6 more comments

I am not sure about that number of COBOL programmers is over a million, but, the 90% of all transactions is only slightly exaggerated.

Most large banks, most insurance companies, most Utility companies, and most government organizations still use COBOL extensively. So the chances are that you as an individual are initiating five or six COBOL transactions per day.

Java is slowly encroaching on the traditional COBOL workload, and, so far it is the only "COBOL replacement" to actually displace a significant amount of COBOL applications.

Other previous contenders such as PL/1,C,Pascal,VB,C++ are all in a much steeper decline than COBOL itself.

I think much of this longevity is not due to the language itself, but, rather the excellence of mainframe hardware and its associated systems software. It is only in the past five years that a unix box capable of the same workload (OLTP with limited batch windows) has come on to the market, and, its simply uneconomic to port large applications onto such hardware.

Incidentally its easy to forget that COBOL was one the leading language on the PC and there are still a large number of Windows apps written in MicroFocus or Fujitsu cobol.

share|improve this answer
    
C and C++ are on a steeper decline than COBOL? –  Rein Henrichs Jul 7 '11 at 17:15
3  
Yeah, that definitely cannot be true. Almost all the software I use (including this web browser) are written in C or C++. –  Zhehao Mao Jul 7 '11 at 17:27
1  
Did not mention "C" in the post, which is still going strong. Its difficult to tell but I don't think there is that much new development in C++, its certainly not used much for web stuff, never took off in the science/FORTRAN space. The only recent C++ work I have come across personally is for "Quant" financial analysis. In the last 10 years or so I have never seen (or even seen a proposal for) replacing a COBOL based system with a C++ based system. So in terms of "C++" as a "COBOL replacement" it is in decline even if its still going strong in the systems space. –  James Anderson Jul 8 '11 at 2:48
add comment

These 1 million Cobol programmers must be really good (they hardly ever need any help with their 220 billion lines of code) which explains why there are only 221 questions tagged Cobol on stackoverflow. That's about 1 question for every billion lines of code.

share|improve this answer
    
I'd say the answer to that is that most COBOL developers are over the age of "understands the internet". :\ –  James P. Wright Jul 7 '11 at 17:25
add comment

Yes, COBOL is still alive, and thriving. It's not sexy, or flash, but it has immense amounts of grunt power, and 90% of the world's banks, insurance companies and other corporations that require large amounts of data processed in a short space of time use it.

I couldn't give you a figure, but there is so much COBOL code out there, running happily. I'd reckon the 220 billion mightn't be too far off.

Every time you go to the ATM, every time a direct debit hits your account, every time you pay your insurance premium, COBOL's involved somewhere in the chain!

share|improve this answer
    
"Involved somewhere in the chain". It's like saying that programming assembler thrives, because assemblers is also "involved somewhere in the chain". –  vartec Jul 8 '11 at 9:19
    
So how would you put it then? Frankly, there's still a huge demand for people with cobol skills, and new systems are still being developed in cobol - people just don't hear about them in public because 99.9% of them are in-house, mostly at big banks and finance companies. Not glamorous, but it pays the rent for lots of people. –  TrueDub Jul 8 '11 at 11:58
    
"new systems are still being developed in cobol" - having COBOL "somewhere in the chain" and "being developed in COBOL" are two completely different things. 90% of all software development is in-house. Doesn't stop people from hearing about other programming languages. Huge demand? Seems like 23 times less than Java indeed.com/jobs?q=cobol&l=&rs=1&fromage=last indeed.com/jobs?q=java&l=&rs=1&fromage=last. And if you check in Europe, it's more like 50 to 1. –  vartec Jul 8 '11 at 12:15
add comment

Maybe half truth, in COBOL you will start from scratch..You also do everything like compilers etch so it really is composed of a lot more lines of codes than other programming languages...It's really hard to know how many companies and users statistically even though Cobol is really old it still used around the globe. COBOL…Still Alive? Reason why COBOL is ALIVE

share|improve this answer
add comment

The article got one thing right, IBM's mainframes are still used. What they got wrong is that modern software making use of it would be developed in COBOL. For example one of the product for which lot of COBOL code used to be developed is IBM CICS Transaction Server. Of course it does support old languages like COBOL and PL/I, but for decades now it also supports C, C++, Java. Later is very commonly used in banking.

COBOL having anything at all to do with AWS or Azure, that's just ridiculous.


BTW. I've found Jeff Atwood's blog post answering exact same claims.

I have a hard time reconciling this data point with the fact that I have never, in my entire so-called "professional" programming career, met anyone who was actively writing COBOL code. That probably says more about my isolation as a programmer than anything else, but still. I find the whole situation a bit perplexing. If these 220 billion lines of COBOL code are truly running out there somewhere, where are all the COBOL programmers? Did they write software systems so perfect, so bug-free, that all these billions of lines of code are somehow maintaining themselves without the need for legions and armies of COBOL programmers, decades later?

share|improve this answer
    
Atwoods claims their are ludicrous. How much work has he done in the banking industry? Manufacturing? Some of the things I've seen him say about what every developer should know are silly in perspective of my career. I am a .Net Developer and I have worked actively with COBOL Developers and never in my life needed to know how to make a "FizzBuzz" app. –  James P. Wright Jul 7 '11 at 17:30
    
@James: I've spent few years in banking, and believe me, there was COBOL code somewhere, but I haven't actually met anybody who had to touch it. It was all done through Java interfaces. –  vartec Jul 7 '11 at 22:23
add comment

As a .Net Developer I worked for a multi-national Manufacturing corporation building in house .Net apps. What I did was make things for people in HR, or in Management to make the daily running of the company easier.

However, the company existed and thrived because of the 15 COBOL Developers spread around the world working for them. EVERYTHING depended on those COBOL guys. These 60+ year old men were frequently offered jobs with pay in the range of $100 an hour at other companies. Luckily for the company I worked for, they were all grumpy old men and didn't like change. :P

So yes, COBOL is still very alive and well. If you can handle being a COBOL programmer (I couldn't) then you could make a good living at it, and while companies may be moving forward, there are still plenty out there that just won't see a reason to (until all the COBOL developers die of old age).

I have massive respect for those guys too. Working with them I realized how much Intellisense and code "snippets" have spoiled me.

share|improve this answer
add comment

Just talking about COBOL does not make much sense, as most real world COBOL software makes use of a “database” system that is often intergraded into the compilation pipeline. So it’s COBOL plus a given pre SQL database skills that are often needed.

share|improve this answer
add comment

I know at least one leading ERP package that still has a lot of COBOL in use. Use the right tools for the job, not everything has to be written in the trendy scripting language du jour.

share|improve this answer
add comment

Too add to all the other answers, of which some picked some good points.

  1. COBOL is not popular with cs people. It never way, it never will be - it is not a language suited for computer sciences, and therefore (since most users on forums like this come with that education background) it will not be praised here. Similar with Fortran, MATLAB, PL/I, ...
  2. Yes, companies still use COBOL (I gave some arguments about COBOL in my previous answers here and on SO, so if you want a more argumented discussion you'll have to search for those; just summarizing here) - because large businesses don't like rewriting code every OS generation (cca. every 5 years). COBOL is (although not perfectly) very back-compatible. That means longetivity and software stability. Also, low costs.
  3. COBOL programmers are usually in-house trained. That's why you don't usually find them in places like this, unless some walk on by.
  4. My I.R.S. (or should I say, an equivalent of IRS in my part of the world) clerks are using modern terminals with a command line application written in COBOL :)
share|improve this answer
add comment

There was also a large number of people working with COBOL in 1998-1999 rewriting code to be Y2K compliant.

Its old fashion, not flashy, but it is installed and working. Banks and bank customers like reliability.

share|improve this answer
    
I think you should reword from "trying to rewrite" to "rewriting". Most, if not all, succeeded. –  user1249 Jul 6 '11 at 8:59
    
"Banks and bank customers like reliability" - that's why they move away from obsolete systems, towards ones that are actively supported. –  vartec Jul 7 '11 at 16:03
add comment

My employer has over 100 developers who know COBOL. The entire business is built on it (it's not a bank, either). We actually have .NET programs that call CICS programs (written in COBOL) on our mainframe!

I suspect you don't see many questions about COBOL because:

  1. The syntax and functionality of the language isn't anywhere near as complex or powerful as a language like C# or Ruby.
  2. There are almost always other people in the shop who can help debug the problem. Since most businesses running COBOL are large "enterprise" type business with lots of developers, there is usually no shortage of help.
share|improve this answer
add comment

COBOL still does a lot of stuff that more recent languages don't (or do poorly/inefficiently). Consider fixed-field data -- how would you handle that in your favorite language? For most, you have to extract a substring, then convert it to an appropriate data type, and you have to do this for each field. In COBOL, you just declare an input record type using PICTURE clauses and the run-time handles all this for you. And it's the same with output: no more concatenating a bunch of fields together, padding them out with spaces to get the columns to line up. Perl and PL/I are the only languages I've used that can do this painlessly.

Of course, that's pretty much all COBOL does, so it's not well suited for much except pure "data processing"-type work. But there's an awful lot of that kind of work that still needs to be done, so I don't imagine COBOL will be gone any time soon.

share|improve this answer
1  
Surely this neat functionality could be re-created and put into a "utility" class in any modern OOP language and simply used where needed? –  Darknight Feb 9 '11 at 19:41
    
I'm sure the functionality could, but I'm not sure the efficiency would be there. You'd basically just encapsulate the extract, parse & convert steps. It'd be a handy DSL, I'm sure, but I doubt it would be able to keep pace with a COBOL system (with a run-time that's been refined and tuned over the course of decades) when processing any serious (multi-million record) data sets. –  TMN Feb 10 '11 at 17:25
3  
-1 "COBOL still does a lot of stuff that more recent languages don't" Come on! you seriously expect that newer languages(or versions) will not pick up usefull features from older languages??? Picture this: Microsoft suddenly decided to do a new OS, command line only no graphics! Efficient no? –  DPD Jul 6 '11 at 10:53
2  
@DPD: Show me a language introduced in the last decade that'll let me read in a line of text, then treat characters 11-20 as a number with two decimal places of precision, without extracting it to a temporary variable. Or maybe you'd rather parse XML? Recent languages do support that... –  TMN Jul 6 '11 at 18:51
2  
@TMN: (Decimal(line[11:20]) for line in open('a_file')). That's a iterator btw. How many unreadable lines of code is it in COBOL? –  vartec Jul 7 '11 at 16:41
show 13 more comments

COBOL's biggest problem was that for many years IBM wrote the best compilers and they were very expensive which limited self teaching of the language. Java came along and was free and worked good enough and with the IDEs available to help, it took off. Unfortunately with the lack of competition and the high prices that the universities did not want to pay, the development of it has been very slow. Maybe they are waiting to see what works and then incorporate it into COBOL. Most of the COBOL programs use DB2, the first SQL based DB, or the Oracle SQL database.

share|improve this answer
    
have you read the question asked? "how accurate are these figures? Are there really 220 billion lines of COBOL?" –  gnat Feb 14 '13 at 7:06
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.