Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Don't Count Cobol Out

ScuttleMonkey posted about 6 years ago | from the great-disturbance-in-the-force dept.

Programming 274

Hugh Pickens writes "Although Turing Award-winning computer scientist Edsger Dijkstra once said, 'the use of Cobol cripples the mind; its teaching should, therefore, be regarded as a criminal offense,' Michael Swaine has an interesting entry to Dr. Dobb's Journal asserting that Cobol is the most widely used language in the 21st century, critical to some of the hottest areas of software development today, and may be the next language you'll be learning. In 1997, the Gartner Group estimated that there were 240 billion lines of Cobol code in active apps, and billions of lines of new Cobol code are being written every year. Cobol is a key element in the realization of modern distributed business software architecture concepts — XML/metadata, Web Services, Service Oriented Architecture — and e-business."

cancel ×

274 comments

Sorry! There are no comments related to the filter you selected.

Another one? (5, Insightful)

AKAImBatman (238306) | about 6 years ago | (#25079261)

Edsger Dijkstra once said, 'the use of Cobol cripples the mind; its teaching should, therefore, be regarded as a criminal offense,'

Dijkstra was not known for being conservative in his statements of opinion. His "GOTO considered harmful" essay did a lot of good, but it also did quite a bit of damage. To the point where we ended up with a variety of "considered Harmful" Considered Harmful [meyerweb.com] essays.

(I wonder if ""Considered Harmful" Considered Harmful" Considered Harmful is soon to follow? Oh wait. That already happened [purdue.edu] in '87.)

A more conservative viewing of COBOL would show that it held a useful place in history, but is now antiquated. You'd need to be extremely conservative to think that COBOL has a place for growth in the modern world.

...

Oh snap. We got another one.

In 1997, the Gartner Group estimated that there were 240 billion lines of Cobol code in active apps, and billions of lines of new Cobol code are being written every year.

Let's be realistic here.

1. 1997 was 11 years ago
2. Everyone was preparing for Y2K
3. Those billions of lines of code were often replacing billions of lines of coded that were removed

As someone who once worked with mainframes, I can tell you that COBOL isn't dead. However, it's not exactly thriving, either. Legacy systems do their jobs well, so there is little reason to replace them. Instead, many companies use technologies like Java->CICS connectors to bridge the gap between old and new. But that doesn't mean that anyone is going to be developing "millions of lines of COBOL".
Quite the opposite, in fact. Business moves more quickly today than in any period in history. And with business moving so quickly, companies find they need to develop new aspects to their businesses. Those new aspects often take the form of new opportunities to develop new software.

If anything, I think COBOL is still hanging on because the mindset for technology is still external facing. Remember the Dot Com Boom? Well, one of the side effects was that technology shifted from optimizing internal operations to interacting with customers directly. Which is not a bad thing, except that internal operations shouldn't be neglected. Thus I see a lot of companies with inefficient internal procedures because they have not invested in proper internal technology infrastructure. This has left a niche where old COBOL programs are nursed along despite a growing amount of manual work for employees at many companies.

Wouldn't it be nice if technology could solve their problems? Well, it can. All we need is someone to make the investment.

With the economy going bust at the moment, I have a feeling the pendulum is going to swing back the other way. Companies are going to need to tighten their belts and become more competitive on price. Which means that they need more efficient operations. With the massive advancements in technology and ensuring code quality in the last 10 years, I fully expect that companies will soon have systems every bit as solid as their COBOL mainframes. Except they will be designed with more rapid change and flexibility in mind.

Cobol defeated da Terminator (5, Informative)

schwaang (667808) | about 6 years ago | (#25079515)

Gov. Schwarzenegger ordered a cut in pay to California state workers, and was told that it would be impossible to implement because the payroll system is in Cobol [sacbee.com] and nobody can touch it.

Sounded like political bull to me, but then again...

Re:Cobol defeated da Terminator (-1)

Anonymous Coward | about 6 years ago | (#25079687)

Incorrect. The Gubenator uses COOL. He felt the Business community in Cauliflornia let him down. Now, only himself and his close friends Chuck Norris, Clint Eastwood, and myself use it.

Re:Cobol defeated da Terminator (5, Funny)

guyminuslife (1349809) | about 6 years ago | (#25079735)

FYI: When he was reprogrammed by John Connor, it was in COBOL.

Re:Cobol defeated da Terminator (1)

Ethanol-fueled (1125189) | about 6 years ago | (#25080835)

Another little-known fun fact is that Robocop sees assembly language and DOS commmands.

For real. Unfortunately, I couldn't find any links :(

Re:Cobol defeated da Terminator (4, Interesting)

electrictroy (912290) | about 6 years ago | (#25079995)

Dear younglings (or oldlings):

If you want a REAL challenge, forgot cobol. Try programming an Atari 2600 gaming console. You have just 128 bytes of RAM to create a playable video game. (No that was not a typo... 128 bytes.)

I tried it once.
I gave up.
It gave me new respect for the original Atari geniuses who created playable versions of Space Invaders, Missile Command, Cosmic Ark, and Jr. Pacman, and turned a cheap console into the #1 system of its day (1977-to-1984).

Re:Cobol defeated da Terminator (3, Interesting)

AKAImBatman (238306) | about 6 years ago | (#25080177)

The Atari 2600 isn't that hard. It may be limited, but the 6502 is actually a pretty developer friendly architecture. Modern debuggers like the one in Stella can make the process pretty straightforward. (Though I would never dispute the challenges posed by cycle counting in an effort to get better graphics out of the system!)

If you want a real challenge, try programming the IBM PC in assembler sometime. As in the original systems from the early 80's. It won't take you long to start swearing at the stupid memory segments with their stupid memory models all focused on stupid interrupt calls that are stupidly undocumented! GAH! To add insult to injury, try 80286 protected mode. (Hint: It never actually worked.) For even more fun, try dealing with EMS and XMS memory using a DOS compiler. Yay! How fun! How wonderful! How challenging! And not in a good way!

Stupid PC. It's amazing that we let it become the dominant platform. (Though in the defense of us geeks, a modern PC does look a LOT different than those beasts of yore.)

Re:Cobol defeated da Terminator (1)

dogboi (1111269) | about 6 years ago | (#25080703)

Arrr, if PCs rule the sea, I say we be raiding their coffers!

Re:Cobol defeated da Terminator (1)

mikael (484) | about 6 years ago | (#25080647)

There may have only been 128 bytes of RAM, but the game itself was stored in ROM. The RAM was used to store temporary variables (player scores, player positions, player state, game level, game mode). It would take more than 128 bytes to write something like the sprite tank battle game in the Combat cartridge. You would need 64 bytes to store the bitmaps for each tank orientation (8 directions x 8x8 bit sprite = 64 bytes).

The most amazing cartridge was Atari 800 Basic which attempted to implement the Basic programming language on a console system. You only had 128 bytes to write a program in (keywords were tokenised). At most that gave you 20 lines to program in and graphics simply consisted of a red square and a white square. With some keywords to read the keypad, you could do a simple game like "dodge the white square".

Re:Cobol defeated da Terminator (2, Interesting)

AKAImBatman (238306) | about 6 years ago | (#25080823)

The most amazing cartridge was Atari 800 Basic

I believe mikael intends to refer to Atari 2600 BASIC [atariage.com] . It was limited to 9 characters per line and that only worked because it flickered like mad. Crazy, crazy idea. The 2600 simply didn't have enough hardware to generate a text display, even if we assume that cartridges could use superchips for an extra 128 bytes of memory. 2 sprites per scanline just isn't much to work with.

The Atari 800 was a much more sophisticated piece of hardware with support for many more sprites, tillable backgrounds, and a full text display. (Most programmers don't think about it these days, but there is no real-world difference between rendering text and rendering background tiles in a game. That's why backgrounds showed up in video games. Because they needed text displays!)

Re:Cobol defeated da Terminator (1)

mikael (484) | about 6 years ago | (#25080899)

Yes, that's the one - I still remember the day I went into town with my parents to buy the cartridge and reading the manuals while taking the bus home. There were labels that were placed on top of the keypads to show which button did which. Like a ZX Spectrum, each key had at least three different color coded functions.

The Atari 800 was definitely much nicer - plus the two bonus secret graphics modes which supported four color characters although these were only 4x8 pixels in size.

Re:Cobol defeated da Terminator (0)

Anonymous Coward | about 6 years ago | (#25080847)

The most amazing cartridge was Atari 800 Basic

I think you mean Atari 2600 Basic - the Basic cartridge for the Atari 800 was way more functional, you had almost 64K of RAM to work with.

Re:Cobol defeated da Terminator (1)

mikeabbott420 (744514) | about 6 years ago | (#25080859)

Atari sprites were implemented by displaying the contents of a section of memory as a bit map in a column down the screen. you moved the sprite horizontally by writing to an 8 bit register ( many memory mapped i.o. addresses - which cost a lot of the 64K ). vertically was accomplished by actually changing the contents of the memory - rotating the non-zero and eraser edge part of the column of memory. everything ran off the TV vertical blank interrupt to rewrite the screen while it wasn't being drawn. there was a horizontal interrupt as well but only a very few cycles available when every op took multiple ticks. there was a collision detection register set as well to tell what had bumped into what. I had no idea what I was doing , ( some Byte magazine De Re Atari by chris ??? ) but I had a lot of fun.

Re:Another one? (4, Interesting)

number6x (626555) | about 6 years ago | (#25079569)

I absolutely agree. There is a lot of new COBOL being written, but it is usually done to enhance existing systems.

I am currently on a project at a major insurer on a system that is about 90% COBOL. Over the nextre year most of the Batch functionality will be replaced with smaller Real-time enabled called routines running as headless transactions in a CICS region.

The code base will be greatly reduced because the majority of the field validation is being moved into the new front end web app from the old COBOL based CICS green screens and the Nightly batch routines. The COBOL code will just wait for messages to show up over the Queue and either update, create, read or delete things in DB2.

The software system is really pretty robust for a Mid-80's era design. It has no central database, each separate portion of the company processes transactions in a distributed peer to peer fashion. Quite advanced for mainframe systems of any era let alone when PC's were just breaking into the 16 bit cpu and greater than 640 k era.

Mainframes are much cheaper now as well. The models produced by IBM today run on air cooled power PC CMOS design chips and start in the $300K range (and go way up). Paying for comparable computing power on an Intel based platform would cost less, but if you start demanding the 9 nine's of uptime that mainframes deliver the cost of the high availability Intel based machines goes way up and you get into the $250K range.

People used to believe that 'network' computing would kill the mainframe. Now the mainframe is just a part of the network.

Re:Another one? (0)

Anonymous Coward | about 6 years ago | (#25080565)

I absolutely agree. There is a lot of new COBOL being written, but it is usually done to enhance existing systems.

I am currently on a project at a major insurer on a system that is about 90% COBOL. Over the nextre year most of the Batch functionality will be replaced with smaller Real-time enabled called routines running as headless transactions in a CICS region.

The code base will be greatly reduced because the majority of the field validation is being moved into the new front end web app from the old COBOL based CICS green screens and the Nightly batch routines. The COBOL code will just wait for messages to show up over the Queue and either update, create, read or delete things in DB2.

The software system is really pretty robust for a Mid-80's era design. It has no central database, each separate portion of the company processes transactions in a distributed peer to peer fashion. Quite advanced for mainframe systems of any era let alone when PC's were just breaking into the 16 bit cpu and greater than 640 k era.

I hope COBOL wasn't the cause the seemingly random noun capitalization above (boldfaced by me).

Re:Another one? (1)

morgan_greywolf (835522) | about 6 years ago | (#25079941)

If anything, I think COBOL is still hanging on because the mindset for technology is still external facing.

Yes and no. In the financial industry, for example, COBOL mainframes hang on primarily because their reliable. They're not looking for just 'three 9s'. That's because 'three 9s' just ain't good enough! These people run 24x7x365 global businesses. They can't afford to have ANYTHING go down. Ever. A missed transaction means EXTREME costs. Multiply that by the millions of transactions they do in a second, and, well, you can just forget about 'three 9s.'

Re:Another one? (3, Insightful)

Mike Buddha (10734) | about 6 years ago | (#25080381)

Yes and no. In the financial industry, for example, COBOL mainframes hang on primarily because their reliable.

BS. In the financial industry COBOL mainframes hang on because they're PAID FOR.

Re:Another one? (2, Interesting)

syousef (465911) | about 6 years ago | (#25080071)

Dijkstra was not known for being conservative in his statements of opinion. His "GOTO considered harmful" essay did a lot of good, but it also did quite a bit of damage. To the point where we ended up with a variety of "considered Harmful" Considered Harmful essays.

(I wonder if ""Considered Harmful" Considered Harmful" Considered Harmful is soon to follow? Oh wait. That already happened in '87.)

Typical COBOL developer. That's so last century. Don't you know we call them Anti-patterns now? Get with it already!

(Moderation Hint: This was a tongue in cheek joke not a troll).

No (2, Insightful)

Gat0r30y (957941) | about 6 years ago | (#25079277)

I'm gonna go ahead and count COBOL out. Don't be silly.

BSG (3, Funny)

HTH NE1 (675604) | about 6 years ago | (#25079327)

Long Live the Lords of COBOL.

Re:BSG (1)

Kethinov (636034) | about 6 years ago | (#25079367)

Long Live the Lords of COBOL.

I'm definitely not counting it out. Galactica and fleet could still settle there now that they've discovered Earth is a devastated wasteland!

Re:BSG (1)

Simmeh (1320813) | about 6 years ago | (#25079391)

"and may be the next language you'll be learning."

Been there done that.

So say we all.

Re:BSG (1)

morgan_greywolf (835522) | about 6 years ago | (#25079977)

Been there done that.

So say we all.

Yeah, but you can tell the posers from the real deal. Real COBOL programmers have stubs where there fingers should be.

Re:BSG (3, Funny)

pilgrim23 (716938) | about 6 years ago | (#25079703)

COBOL? bah! FORTRAN rulz!

-and he said with a face quite solemn: "You better start in the 7th column"

Best Part (5, Insightful)

Gat0r30y (957941) | about 6 years ago | (#25079387)

It may seem surprising that it takes any programming at all to implement a salary change in a payroll system, but a commenter on Slashdot said it was at least plausible, and that's good enough for us.

I think this alone should be enough to discredit the author.

Re:Best Part (1)

Rayeth (1335201) | about 6 years ago | (#25079809)

Mod Parent Up. Seriously that comment should basically disqualify anyone attempting to do scientific research or prove anything about anything.

Re:Best Part (2, Insightful)

oldhack (1037484) | about 6 years ago | (#25079905)

Btw, I had been a long-time subsrcriber of Dr. Dobbs, until about a year ago. About the only thing worth saving from what it has become is Swaine's column.

ROI (4, Insightful)

plopez (54068) | about 6 years ago | (#25079401)

What many people don't get is that a good business person goes after ROI. If you spend money on something, you want to get money out of it. Squeeze every dime until it screams (which I respect, BTW). Ripping out something just because it isn't cool doesn't play. Enhancing or building on top of it when there is a good business case does play. If it ain't broke, don't fix it.

Having to upgrade every 3-5 years means no ROI. This is a great argument against closed source proprietary vendors.

BTW, there is OO COBOL out there. And FORTRAN 95 is OO as well, which I am ramping up to do a project in soon (I hope).

Re:ROI (1)

John Hasler (414242) | about 6 years ago | (#25079597)

> BTW, there is OO COBOL out there.

OO is so twentieth century. Where is the functional COBOL?

Re:ROI (3, Interesting)

Darkness404 (1287218) | about 6 years ago | (#25079717)

The problem with COBOL is that it isn't flexible. I have heard of many businesses having to rewrite many lines of COBOL in order to do simple things such as payroll changes, etc. Also, COBOL isn't very quick to write, what can be done in 50 lines of COBOL can be done in 30 lines of C, and about 20 lines of Python or Java.

Re:ROI (5, Insightful)

hey! (33014) | about 6 years ago | (#25080469)

Well, that's a matter of being in a hurry go get the program out the door. There's lots of parameter input through the compiler going on. Always has been.

I personally like terse languages, but I think coupling is a bigger issue. Fifty lines of self-contained COBOL are easier to understand than twenty lines of highly coupled Python that depends on assumptions spread far and wide in the system.

One of the reasons that so many COBOL systems remain is that they were written in a day when most tasks ran top to bottom. It was before the "event loop" became a familiar pattern to most programmers. In a sense, it shows how reusability can shoot you in the foot (there's few worthwhile tools that can't be dangerous some of the time). Back in the day the vast majority of programs had well defined input, performed a well characterized calculation on that input, and produced a well defined output. Now consider something that is a component in a framework. It has to be damn well conceived because it's meant to operate in situations the designer has never even conceived of.

So, I'll bet that the COBOL that survives is stuff which does something that is clearly defined, simple, and useful. Why convert it to Java if it works fine and is part of a large body of software that works fine?

Re:ROI (4, Interesting)

geekoid (135745) | about 6 years ago | (#25080621)

Anecdotal.
Properly written COBOL is as flexible as anything else.
Badly written COBOL isn't flexible--just like every other language.

"COBOL isn't very quick to write, what can be done in 50 lines of COBOL can be done in 30 lines of C, and about 20 lines of Python or Java."
and 1 line in perl.

Where do you get your numbers. I can do things in 20 lines of COBOL that would take 100's of lines in C.And it performs faster then those languages. When you are doing millions of financial calculations and hour, you need reliability and rock solid performance.

Re:ROI (0)

Anonymous Coward | about 6 years ago | (#25080653)

>. And FORTRAN 95 is OO as well, which I am ramping up to do a project in soon (I hope).

Well it is Fortran, they lost the caps for Fortran 90. And also Fortran 2008 includes even more OO than any one before it.

-- Pinski

Still taught in schools (3, Interesting)

Judinous (1093945) | about 6 years ago | (#25079425)

My University (Texas A&M Kingsville) still requires COBOL for every IT-related degree, even those not oriented towards programming. My jaw almost hit the ground when I found out that I was going to have to take a COBOL class to earn my CIS degree. Although there is obviously still a need for people to support applications written in that archaic language, I really wish that the bureaucracies of the world would let it die already.

Wasn't BASIC (1)

stm2 (141831) | about 6 years ago | (#25079453)

the use of Cobol cripples the mind; its teaching should, therefore, be regarded as a criminal offense

I thought it was BASIC and not Cobol in that sentence.

Re:Wasn't BASIC (4, Informative)

VGPowerlord (621254) | about 6 years ago | (#25079833)

No, I just switched his COBOL quote out for the BASIC one on my whiteboard at work on Monday.

The BASIC one is

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration.

See: Wikiquote [wikiquote.org]

No. (1)

repvik (96666) | about 6 years ago | (#25079901)

Quote: http://www.informatik.uni-freiburg.de/data/citations/citation.2007-06-26.0532689966/view?set_language=en [uni-freiburg.de]

Dijkstra said this about BASIC though: "It is practically impossible to teach good programming style to students that have had prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."

Baby Boomers + COBOL (2, Interesting)

halsver (885120) | about 6 years ago | (#25079477)

As a younger person in the world of IT, I question how much longer things like COBOL survive. My theory is that with the aging Baby Boomer population, those IT managers will soon head off to retirement. Younger folks will look at that COBOL as something that needs to go and with Bob gone, we can slowly bring that system to the 21th century.

As an aside, /. had this little quote at the bottom of the page when reading TFS: "senility, n.: The state of mind of elderly persons with whom one happens to disagree." I thought it was fitting.

Re:Baby Boomers + COBOL (1)

jwegman (228147) | about 6 years ago | (#25079991)

Younger folks will look at that COBOL as something that needs to go and with Bob gone, we can slowly bring that system to the 21th century.

COBOL is not still around because "old Bob" won't get with the times, it's still around because there are untold millions of dollars invested in the code and it would cost many more untold millions to replace it. And for what? If it's working fine, there's no reason to rip it out and replace it. Business is about making money, not wasting money on today's latest fad.

Re:Baby Boomers + COBOL (1, Insightful)

Anonymous Coward | about 6 years ago | (#25080571)

The old "sunk cost, cognitive dissonance" argument.

You might say something "works just fine" but I, e.g., the VP of operations who gets to decide, might say it needs to be improved, that "just fine" is not going to be sufficient for our future.

 

Re:Baby Boomers + COBOL (1)

geekoid (135745) | about 6 years ago | (#25080629)

COBOL is a 21st century language.
Cost, reliability, and performance are the factors.

COBOL will be here in 50 years.

No way (5, Insightful)

OpenSourced (323149) | about 6 years ago | (#25079539)

and may be the next language you'll be learning

Just impossible. Basically because it was the second language (after FORTRAN) that I learned. I don't really understand the fuss about COBOL. Never found it either much worse or much better than other languages. The thing to remember about COBOL is that it was developed to solve a specific kind of problems. Today we would call it a Domain-Specific Language. And that kind of problems it solves with relative straightforwardness. Most of the critics I see of COBOL are for trying to use it as a general-purpose language. I mean, you don't try to write a text editor in PL-SQL, even if you probably could. And nobody criticizes PL-SQL for that reason.

So COBOL is outdated and verbose. True. So what. It's been years since a wrote a line of the beast, but I wouldn't have a problem to start working with it tomorrow. Also, as the set of problems that it was designed to solve was reduced, it as very pliable to being automatically generated.

So, a language is a language, all have their problems and advantages. Me, I care much more about the size of my screen or the strength of the air conditioning in my workplace than about the particular dialect that I have to program this week.

GOODBYE WORLD (5, Funny)

Tumbleweed (3706) | about 6 years ago | (#25079541)

000100 IDENTIFICATION DIVISION.
000200 PROGRAM-ID.     HELLOWORLD.
000300
000400*
000500 ENVIRONMENT DIVISION.
000600 CONFIGURATION SECTION.
000700 SOURCE-COMPUTER. RM-COBOL.
000800 OBJECT-COMPUTER. RM-COBOL.
000900
001000 DATA DIVISION.
001100 FILE SECTION.
001200
100000 PROCEDURE DIVISION.
100100
100200 MAIN-LOGIC SECTION.
100300 BEGIN.
100400     DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
100500     DISPLAY "NO THANKS!" LINE 15 POSITION 10.
100600     STOP RUN.
100700 MAIN-LOGIC-EXIT.
100800     EXIT.

Re:GOODBYE WORLD (1)

hax4bux (209237) | about 6 years ago | (#25079733)

*sigh* thats the stuff

Hey, loan me one of your job cards. The keypunch machine ate mine.

Re:GOODBYE WORLD (1)

Tumbleweed (3706) | about 6 years ago | (#25079895)

Hey, loan me one of your job cards. The keypunch machine ate mine.

cookie.

Re:GOODBYE WORLD (2, Funny)

Quiet_Desperation (858215) | about 6 years ago | (#25079763)

Ack! You gave me major flashbacks to the old Cyber systems I used in college. *And* made me feel old. Bastard!

Re:GOODBYE WORLD (3, Funny)

morgan_greywolf (835522) | about 6 years ago | (#25080001)

Ack! Get that away! It might be contagious!

Old Joke (3, Funny)

PPH (736903) | about 6 years ago | (#25080119)

So, Tumbleweed wakes up after almost 8000 years in suspended animation. An official in the year 9999 says, "Having searched the ancient archives of Slashdot, we see that you appear to have a working knowledge of COBOL. We have this Y10K problem coming up and we were wondering if you could possibly give us a hand with it."

Re:GOODBYE WORLD (1)

ivandavidoff (969036) | about 6 years ago | (#25080579)

Oh, my. Good old RM/COBOL. MACOLA got its start with an RM/COBOL rewrite of MCBA's accounting package, which was written in TI-COBOL. I got source code for 4 modules (A/R, G/L, I/M and SOP) and rewrote them from top to bottom to comply with some byzantine business rules. The damn thing screamed on an IBM PC-AT, and was viable all the way into the mid-90s, when management decided they wanted something that would work with a mouse.

Re:GOODBYE WORLD (2, Informative)

geekoid (135745) | about 6 years ago | (#25080649)

000010 IDENTIFICATION DIVISION.
000020 PROGRAM-ID. HELLO-WORLD-PROG.
000030 AUTHOR. TIMOTHY R P BROWN.
000040*The standard Hello world program
000050
000060 ENVIRONMENT DIVISION.
000070
000080 DATA DIVISION.
000090 WORKING-STORAGE SECTION.
000100 01 TEXT-OUT PIC X(12) VALUE 'Hello World!'.
000110
000120 PROCEDURE DIVISION.
000130 MAIN-PARAGRAPH.
000140 DISPLAY TEXT-OUT
000150 STOP RUN.

Some c (3, Funny)

geekoid (135745) | about 6 years ago | (#25080655)

#include "stdio.h"
#define e 3
#define g (e/e)
#define h ((g+e)/2)
#define f (e-g-h)
#define j (e*e-g)
#define k (j-h)
#define l(x) tab2[x]/h
#define m(n,a) ((n&(a))==(a))

long tab1[]={ 989L,5L,26L,0L,88319L,123L,0L,9367L };
int tab2[]={ 4,6,10,14,22,26,34,38,46,58,62,74,82,86 };

main(m1,s) char *s; {
        int a,b,c,d,o[k],n=(int)s;
        if(m1==1){ char b[2*j+f-g]; main(l(h+e)+h+e,b); printf(b); }
        else switch(m1-=h){
                case f:
                        a=(b=(c=(d=g)g)'g)g;
                        return(m(n,a|c)|m(n,b)|m(n,a|d)|m(n,c|d));
                case h:
                        for(a=f;a=e)for(b=gg;bn;++b)o[b]=o[b-h]+o[b-g]+c;
                        return(o[b-g]%n+k-h);
                default:
                        if(m1-=e) main(m1-g+e+h,s+g); else *(s+g)=f;
                        for(*s=a=f;ae;) *s=(*se)|main(h+a++,(char *)m1);
                }
}

Re:GOODBYE WORLD (2, Funny)

Tumbleweed (3706) | about 6 years ago | (#25080719)

000150 STOP RUN.

Well, which is it, STOP or RUN? I guess we've identified where Apple got the 'drag disc to trashcan to eject' and where Microsoft got 'Click the Start button to shutdown' mindset from.

Why, what trendy buzzwords you have. (3, Funny)

extrasolar (28341) | about 6 years ago | (#25079549)

Are you wading the waters to determine how palletable COBOL would be in your buzzword soup? Web 2.0 COBOL cloud computing does have a ring to it. Old is the new "new".

Re:Why, what trendy buzzwords you have. (3, Funny)

Sloppy (14984) | about 6 years ago | (#25079721)

With Cogs [coboloncogs.org] you can keep up with many of the latest buzzwords.

Re:Why, what trendy buzzwords you have. (1)

extrasolar (28341) | about 6 years ago | (#25080867)

Hahah, thanks. That site is delicious. I especially liked the screen burn effect :)

Re:Why, what trendy buzzwords you have. (1, Interesting)

Anonymous Coward | about 6 years ago | (#25079921)

I am of the opinion that sinister-sounding acronyms like COBOL are a lot cooler than all the cutesy names we have today. "Java"? Ugh.

Next thing you know.. (2, Funny)

mr_stinky_britches (926212) | about 6 years ago | (#25079581)

they're going to be telling us that Fortran is the new Java.

Re:Next thing you know.. (0)

Anonymous Coward | about 6 years ago | (#25079639)

Don't be stupid. Fortran was/is a useful, professional language.

job market (2)

sstory (538486) | about 6 years ago | (#25079599)

What do COBOL coders make these days? Is it worth learning?

Re:job market (3, Interesting)

FatMacDaddy (878246) | about 6 years ago | (#25079753)

You've directly addressed why I think this article is bogus. I know a boatload of former COBOL programmers who would jump at a COBOL job offer. Too bad there aren't any. Most of those guys are either working in java or else have left programming entirely (to go to management or completely different fields).

Maybe you shouldn't count COBOL out in terms of it still being used in the business world, but I sure wouldn't base any career decisions around it.

Re:job market (1)

geekoid (135745) | about 6 years ago | (#25080669)

We are looking, and are people get offers.
I know people making 100 Plus an hour and have been for years.

Maybe those programmers should get out of the boat and work at getting a job~
Of course, the area they are in may not need any right now.

Re:job market (5, Funny)

PPH (736903) | about 6 years ago | (#25079777)

What do COBOL coders make these days?

COBOL programs.

<rimshot/>

Re:job market (1)

Darkness404 (1287218) | about 6 years ago | (#25079879)

In my experience, COBOL coders mostly work on old COBOL programs. Very few new things get written for it. Old bugs get ironed out and new ones get added in. And the answer to your question is probably no. I don't see COBOL going anywhere in the next few years and I see it becoming less and less of a solution as old programs eventually get written in C, Python, Java, etc.

Re:job market (1)

Tablizer (95088) | about 6 years ago | (#25079923)

I don't see COBOL going anywhere in the next few years and I see it becoming less and less of a solution as old programs eventually get written in C, Python, Java, etc.

And somehow I bet COBOL will outlast all of those.
   

Re:job market (1)

Darkness404 (1287218) | about 6 years ago | (#25079987)

I'm sure that's true. On the other hand though, I can not see COBOL's marketshare growing at all. Basically all it is used for now is to fix old programs. C is becoming more like a '90s fad, and I think that Python and Java will be remembered for being a 2000s fad, but I just can't see COBOL actually going anywhere. COBOL isn't dead yet, but it certainly isn't living a healthy life. Chances are, in the year 2030 there will be some business still running COBOL, however (hopefully!) most other businesses will be using more modern languages such as C, Python, Java or even some language that today is obscure or not even invented yet.

Why is Cobol hated? (1)

Compuser (14899) | about 6 years ago | (#25079633)

Can someone give me a side-by-side example of C and Cobol program or statement to do the same thing which would illustrate why Cobol is so "evil"?

Re:Why is Cobol hated? (5, Informative)

nawcom (941663) | about 6 years ago | (#25079727)

Can someone give me a side-by-side example of C and Cobol program or statement to do the same thing which would illustrate why Cobol is so "evil"?

C (No bells or whistles): http://99-bottles-of-beer.net/language-c-116.html [99-bottles-of-beer.net]

COBOL (or as I call it, COBALD): http://99-bottles-of-beer.net/language-cobol-1820.html [99-bottles-of-beer.net]

Re:Why is Cobol hated? (2, Insightful)

PRMan (959735) | about 6 years ago | (#25080039)

You picked the wrong choice to show him why COBOL is hated.

Typical Mainframe COBOL [99-bottles-of-beer.net]

Re:Why is Cobol hated? (2, Insightful)

geekoid (135745) | about 6 years ago | (#25080697)

SO?
Comparing the number of lines is a waste of time and shows a lack of knowledge about what is actual important about programming.

Most people don't understand COBOL, and there for think it's bad becasue its old and give crappy examples the show how ignorant they are.

Re:Why is Cobol hated? (2, Interesting)

Darkness404 (1287218) | about 6 years ago | (#25079779)

Not being a COBOL programmer (nor a C programmer either), I can't give you a code by code example on why C is better. But I can tell you that a lot more things have to be rewritten to do simple changes in COBOL compared to the equivalent code in C.

Re:Why is Cobol hated? (3, Funny)

bangwhistle (971272) | about 6 years ago | (#25080045)

COBOL may be the best "self-documenting" language. Which I guess isn't very relevant as we know developers love to document their code.

Re:Why is Cobol hated? (1)

WebManWalking (1225366) | about 6 years ago | (#25080233)

C:

total = 0;
for (i = 0; i total += NumberOfDays[i];

COBOL:

MOVE 0 TO Total.
PERFORM VARYING i FROM 1 BY 1 UNTIL i > 12

ADD NumberOfDays(i) TO Total
END-PERFORM.

This illustrates that C arrays are 0-based and COBOL arrays are 1-based.

It also illustrates that COBOL, while wordier, is self-documenting, at least in the sense that a non-programmer can pick it up and read it.

However wordy the language is, the generated code from COBOL is generally quite good. I have code in 5 different assembly languages, so I'm not scared to look at generated code. I've seen some amazing code optimizations in COBOL. For example, in bulk moves of memory to memory, I've seen registers used cleverly to save only 2 instruction cycles, with no loss of compactness. I attribute this to the fact that benchmarks are used to win procurements, so mainframe manufacturers want to be sure their generated code runs faster than their rivals' generated code.

That said, COBOL was developed at a time when computer memory was insanely expensive. Programs had to fit into very tiny address spaces. Much of the restrictions of the language, particularly buffered I/O, existed because you couldn't fit much of a file into memory as the program read through it.

As for why it's hated, the less you know about something, the easier it is to criticize. I'm sure most of the haters in this thread don't know how to read assembly language, let alone how to write it. So if they hear someone say "COBOL generates inefficient code", they believe it and repeat it. They have no way to confirm or deny the assertion.

Re:Why is Cobol hated? (1)

WebManWalking (1225366) | about 6 years ago | (#25080253)

... er, I should have said, I have CODED ....

Re:Why is Cobol hated? (1)

WebManWalking (1225366) | about 6 years ago | (#25080317)

... and my 'for' statement got corrupted by the less-than. To save you from having to do a View Source, it said:

for (i = 0; i < 12; i++)

Re:Why is Cobol hated? (1)

ze_jua (910531) | about 6 years ago | (#25080281)

It's difficult to write a such example : A "hello world!" programm in Cobol is about 20 lines long (only 5 lines with Cobol85).

C is a low level language. You can work with memory, system cals, do recursive functions, etc. With C you can write 3D graphics, a cobol compiler :), Doom, the linux kernel (If you know asm to), and everything.

Cobol is a high level langage, mainly oriented to string and files/data manipulations. It can't do many more, but what is done with it is rock.

A Key Element? (1)

Mr.Bananas (851193) | about 6 years ago | (#25079661)

While there may possibly exist some implementation of the summary's mentioned "XML/metadata, Web Services, Service Oriented Architecture" in COBOL, I wouldn't consider it a key element to these technologies. It may be that perhaps many new technologies are required to work with existing mainframes running a whole mess of COBOL code, but COBOL itself is not a key contributing factor to the success of these technologies. If anything, a good implementation should use abstraction to make legacy technologies irrelevant and compatible with newer technologies.

Bollocks (1, Insightful)

MosesJones (55544) | about 6 years ago | (#25079711)

Seriously I can't think of something that is more rubbish. Yes COBOL is out there, but as a mainstay of XML and Web Services? Are you serious? Have you tried getting an old mainframe to talk in Unicode? COBOL is what old apps are written in and what they are maintained in, its not that there are no jobs but you'd be nuts if you are a talented coder to get into COBOL. If you are 50 and want a pension however its an ideal area to get into.

Yes I know COBOL, yes I have developed and maintained in it, and NO it isn't the next thing, its the crap that people wrote when the average IQ in Computing was miles higher than today but the tools were miles worse. What I really pity is the people who are maintaining C++ developed in the 90s. That stuff sucked.

Re:Bollocks (2, Interesting)

geekoid (135745) | about 6 years ago | (#25080731)

I guess someone who quotes Gandhi showing off his complete ignorance shouldn't be expected to know the many new COBOL apps are used, and there are some very widely used enterprise systems that sue a language very similar to COBOL.

Clarification (5, Funny)

Waffle Iron (339739) | about 6 years ago | (#25079789)

In 1997, the Gartner Group estimated that there were 240 billion lines of Cobol code in active apps, and billions of lines of new Cobol code are being written every year.

The report neglected to mention that 239.9 billion of those lines were boilerplate headers and math operators spelled out with English verbs.

In 1997??? (1)

hs44352000 (1367761) | about 6 years ago | (#25079909)

Honestly, I can only think of three words in reply to that. WTF?

We're not talking about the stylistics of Ancient Egyptian art or the evolution of the galaxy. In 11 years the landscape of the programming language world can change entirely. And since 1997 it has done so. This is absolutely the number one worst ever post on slashdot. Trying to tell us that we might be learning Cobol next is like going to a paleontology conference and telling everyone that they're going to have to study the Bible next. The only thing it does is make you look ignorant.

Cobol does have its merits (1, Funny)

Anonymous Coward | about 6 years ago | (#25079925)

It's really cool if you remove the 'b'.

You know the pose (4, Funny)

david_thornley (598059) | about 6 years ago | (#25079971)

Noooooooooooooooooooooooooooooooooooooo!!!!!

What I got when I tried to post the original:

Filter error: Don't use so many caps. It's like YELLING.

So what do you do when yelling is appropriate?

Re:You know the pose (1)

geekoid (135745) | about 6 years ago | (#25080749)

If only we had some sort of 'point' to tell people the sentence is exclaiming something..and was used only once at the end of a sentence~

No doubt.... (1)

PPH (736903) | about 6 years ago | (#25080005)

...IT management paid for this.

"Oh please. Recruit us another few thousand COBOL programmers so we can patch this application just one more time."

OK, so COBOL isn't the worst language possible. But given a clean slate, how many new applications would be written in COBOL?

Anybody? (sound of crickets)

I'm wondering whether recruiting CS majors for COBOL jobs is as successful as recruiting high school grads to do military service in Afghanistan is.

Lines of code? (1)

jc42 (318812) | about 6 years ago | (#25080037)

This is one of the prime examples of why measuring code by "lines" is bogus.

After all, in the typical Cobol program, most of the variable names are so long that you can't fit two of them onto a line on your typical cubicle worker's screen. Of course there are zillions of lines of Cobol code. And all those zillions could probably be expressed in perl or python in maybe 100 lines, or 1000 lines of C. (But you wouldn't be able to read them.)

Now if /. only had a HHOS [catb.org] moderation ...

billions of lines (4, Funny)

doti (966971) | about 6 years ago | (#25080059)

"billions of lines of new Cobol code are being written every year"

that accounts two hello worlds, and one program that shows the first 1000 fibonacci numbers.

Kobol - the place of the gods (1)

nilbog (732352) | about 6 years ago | (#25080061)

oh lord o cobol, hear my prayer.

Your Phone books (1)

AEC216 (621410) | about 6 years ago | (#25080073)

Like the phone book? (think "more cowBELL") Produced with COBOL. COBOL can used to make a VERY fast PostScript engine. Single process, 100 pages in about 1 minutes, with pulling high resolution image blobs from Oracle.

now that it has an ELSE statement (1)

presidenteloco (659168) | about 6 years ago | (#25080085)

"COBOL actually aint so bad
repeat until believe

(the above was much more droll in my
original, authentic all-caps cobol-esque
version, but the higher powers have deemed
that you cannot enter caps cobol syntax into
a slashdot post.)

Gotta have more Perl! (1)

Scareduck (177470) | about 6 years ago | (#25080097)

You know, sometimes I get the feelin'
That, that uh, accountants and lawyers
are in cahoots with the Devil
Yeah, they're in cahoots with the Devil!
To cover the Earth
Cover the Earth with this wretched swill
of gutless, mediocre, middle-of-the-road,
sleep-inducing, homogenized pabulum programming languages for the slavery of daily drudgery
Sometimes I get that feeling man, but I know it's a lie
I know it's not true
I know it's not true
And I'm talkin' to Larry Wall now
Larry Wall, I'm talkin' to ya
Larry Wall, where are ya?
Gotta have more Perl!
Gotta have more Perl!

(with respects to Mojo Nixon)

It's over (1)

ze_jua (910531) | about 6 years ago | (#25080103)

<joke>
As all banks (and the USA) are very close to bankruptcy, and that Cobol is mainly used in heavy banking apps, no more Cobol programs should be running at the end of 2008. ...

Arg, oops. Someone just said me that Pdt Bush decided today that the US government will help banks... Some Cobol programs will also see the year 2009.

</joke>

In fact... I think that remaing Cobol programms will still run when the last Java powered device will be trashed (or recycled).

Cobol apps in my company ALWAYS works.

To obtain a 99,999 availability with 'modern' technologies, you need ... [Put there all arguments that can show that *<Cobol+Mainframes]

The Gartner Group also said the MF was dead in '85 (0)

Anonymous Coward | about 6 years ago | (#25080207)

I've been in the financial industry since '81. In this sector there's still a ton of COBOL out there. And, in fact, sometimes it makes sense to expand on the old COBOL CICS code and VSAM rather than build something that takes java ESB, an SQL database, JSP, hand-written HTLM, javascript, unix scripts, autosys, FTP and a bunch of other cludged-up technologies.
Don't get me wrong - I like the new stuff because it makes me marketable and is so complex the users have no choice but to bow down at my feet.
I'm just sayin'....

So that crumby college... (1)

Nyckname (240456) | about 6 years ago | (#25080251)

where I learned COBOL in the early eighties was just ahead of the curve?

And that punch card thing was so retro it was cool, I guess.

Ya don't say (1)

Alarindris (1253418) | about 6 years ago | (#25080465)

A few years ago in college, one of my professors was giving away a table full of programming/comp sci books. I stumbled on 'Basic COBOL' or something like that and joked "You can probably just throw this one out." He laughed and said it was the most widely used language on the planet. At the time I didn't really believe it, but kept it anyway, I'll have to crack it open and take a peek.

Lines of code (1)

jaguth (1067484) | about 6 years ago | (#25080563)

In 1997, the Gartner Group estimated that there were 240 billion lines of Cobol code in active apps, and billions of lines of new Cobol code are being written every year.

Ooooh, Cobol must be popular if there are billions of lines of new code written every year!!! But seriously, the amount of lines of code doesn't mean Cobol is making a comeback. It could be a few companies that write/publish the majority of the billions of lines of code. What I would like see is the amount of code written for every programming language and juxtapose them against Cobol, then we'd get the bigger picture.

Also, I'm sure somebody could fit 240 billion lines of cobol into one line of perl... one reaaallly long line of perl ^_^

this *FP for gNAA (-1, Offtopic)

Anonymous Coward | about 6 years ago | (#25080741)

a conscious stand Completely Before Current core were and some of the

Pedant alert (1)

Insightfill (554828) | about 6 years ago | (#25080763)

Not "Cobol" or "cobol" as the TFS would have it but COBOL.

Now: allow me to rant on all of you who call it the "Patriot Act". ARGGGGGHHH!!

(There: got my pirate cred in there, too.)

Millions of what? (1)

DiegoBravo (324012) | about 6 years ago | (#25080869)

Comparing the "millions" of lines of cobol appls with most languages is not fair. Most of those "millions" are devoted to things that on most current systems are regarded as "configuration" or "rules" or "auxiliar data files". Nobody talks about the "millions" of machine code lines that represent the compiled code, for example.

Despite that, I agree that Cobol is maybe the most used P.L. in business.

Ok But... (1)

sbeckstead (555647) | about 6 years ago | (#25080873)

I'm still not putting it back on my resume. Not no how, not no way.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>