Join COBOL's Next Generation
jfruh writes "COBOL, it's finally becoming clear, isn't going away any time soon; there are far too many business-criticial applications written in it that work perfectly well for that to happen. This reality could be a career boon for IT staff. Need to learn the ins and outs of COBOL? Your employer may well pay for your training. Just getting started in IT? COBOL can provide a niche that gets you a first job."
what COBOL does as well as COBOL does it.
The Kruger Dunning explains most post on
I took COBOL in the 80's, my instructor was one of the guys that MADE COBOL. He said even back then, COBOL will not be going anywhere for decades. Man did he call it.
No FUCKING way.
The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence. -- Dijkstra
So I say any company that wants to send their employees to a COBOL class should be sent to jail for torture and reckless endangerment.
sudo make me a sandwich
I'd rather die than ever program in COBOL again...
If you already know Java, you don't need it. There is so much enterprise Java code out there that there will be work for Java coders for at least the next 50 years.
"COBOL, it's finally becoming clear, isn't going away any time soon; there are far too many business-criticial applications written in it that work perfectly well for that to happen.
Well I guess we can finally fire all the COBOL programmers. Their job is now completed.
This is why we can't have nice things.
Just sayin'...
COBOL is one of the few languages that is completely standardized. IO, formatting, everything works the same EVERYWHERE. Certainly, the column nature of coding in the language is annoying, but not much more than BASIC was with it's numbering scheme. As far as the programs that chug through industrial-sized databases go few touch as many records as COBOL does.
They abandoned worshipping the Lords of COBOL a long time ago.
Ezekiel 23:20
not a lot of fun to program in. It's wordy, it's procedural...generally kind of boring. But...it's imbedded in so many mission critical systems. The ERP system that I work on is chock full of COBOL stuff, mainly in the Payroll processing modules. It works, it's really fast, and nobody wants to mess with it. Sure, you could rewrite it in Java or some other language but it represents risk that many companies are not willing to take.
COBOL programmers are in big demand now and it's only going to grow. I'm not sure how many schools still teach COBOL but I suspect it's not many. So if you can put up with having a little less glamorous coding to do it's a great job opportunity.
Pages and pages and pages of foreplay before you get any action.
As a current undergrad studying CS, I've never heard of COBOL in any context other than being a punchline. However, a few days ago at work there was a request for application onboarding for... you guessed it, a COBOL-based application. Suffice it to say I nearly sprayed coffee everywhere.
I remember hearing this same pitch 15 years ago. COBOL, it's what everyone will need training in. COBOL, it's everywhere and can't die, come learn it. Yet, there still aren't many COBOL jobs out there. Too bad, I actually like the language and would enjoy working with it.
People always say Java is the next Cobol. I program in Java, so I guess I already joined the next COBOL gen?
If I recall COBOL was one of those column specific languages that you had to put the right characters in the right columns to make things work.. And I hear people complaining about python being white space specific. Nothing beat counting out your spaces over an old VT100 terminal.
Come on. Why is this even allowed on /.?
The RFA has the email address of the recruiter and is really just a solicitation. The piece on /. is hardly any better.
One of the reasons so much IT outsourcing in mainframe shops is happening is because new workers have little exposure to the mainframe culture. I work in an industry highly dependent on mainframes, but not directly with the technology. However, I do see the fundamental difference between mainframe systems work and Linux/Windows on Intel systems work. For someone who doesn't "get it," mainframes look completely inflexible and definitely a legacy technology. When you're talking about a system that still has references to things like punch cards compared to Windows Server 2012 running in VMWare, there's a huge mindset change. There is also a very strict change control process around everything, usually because messing up something on the mainframe knocks out the company's key business operations. (Example: RBS went offline for days because an (offshore) employee messed up a batch scheduling software upgrade and executed a wrong rollback procedure.)
That's why I think mainframes and COBOL get a bad rap -- they're ancient systems, but only because they work and they're at the core of the businesses that use them. And for the purpose, they're great. Mainframes are designed for maximum transaction throughput and reliability above all else, which is why most people don't use them as a generic computing platform. I'm a systems engineer primarily working on Windows installations, but I'm also flexible and cross-platform enough to understand Linux, UNIX and the other systems our stuff talks to. Because of this, I'm employed -- you wouldn't believe how little effort it takes to stand out in an environment of people who stick to the one system they know. Adding a tool to the tool set isn't a bad thing. I don't know everything about Linux or mainframes, but I can at least ask intelligent questions.
I can also see why people might shy away from learning COBOL, since the MO for most companies dealing with talent shortages is to offshore everything. However, I'm of the mindset that everything happens in cycles. My company is very much "trailing edge" when it comes to IT trends, and we're just starting to figure out that offshoring isn't the magic answer to software development problems. So, I think the trend is coming back around, just like these newfangled "virtual machines" on Intel processors. Wow, what a concept! Sci-fi type stuff! :-)
I've got a pile of various degrees, none in CS, yet I keep ending up coding shit for a living. None of it is all that great - I'm a massive generalist and not a programmer. It's tempting to just get a good intro to COBOL and then dive into it for a career. It's one of those languages that doesn't change much and isn't about to get replaced with the newest and greatest.
After half of my career switching jobs every 3-4 years, I'm thinking about settling down. Compared to what I've had to code so far in life, COBOL doesn't look that bad.
COBOL is plainly superior... from an evolutionary standpoint. It propagated and survived. Nevermind that it feeds on the souls of developers. That's irrelevant. Evolution only cares about propagation and survival.
For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
COBOL is a hipster programmer's dream!
Runesabre
Enspira Online
There is on thing every new COBOL complains about in COBOL: Its too verbose.
There is one thin that every COBOL journeyman loves about COBOL: Its so verbose and easy to read.
Sig Battery depleted. Reverting to safe mode.
I am sure Data can chime in on this.
I'm a good cook. I'm a fantastic eater. - Steven Brust
An identical story was posted back in February. By the same user, no less. So, Mr. Josh Fruhlinger, how much does Eric Bloom pay you to Slashvertise for him?
Everything is better with chainsaws.
So would that be COBOL running on C?
At my work we're just starting a multimillion dollar project, mostly in COBOL, on a mainframe. And I'm not talking about modifying old code, we're developing a new system. So we'll need about 30 new COBOL programmers very soon. It's far from dead!
Try it! Library of Babel
10 YOU PIC 9.
88 READ-THIS VALUE 1.
IF READ-THIS = 1
MOVE YOU TO THIS-JOB
END-IF
My understanding is that there is a compiler from COBOL to Java Bytecode. If so, it seems like it's plausible to compile from COBOL to CLR Bytecode. Either way you can migrate gradually over to a better, more modern language. There are issues, sure, but probably not as many issues as, say, teaching new programmers to write COBOL and maintain it for a few more decades.
MOVE CORRESPONDING. Try doing that right in any other language. Try figuring out where each different C compiler put your bits and bytes, and what size it made your integers, and what other random changes it made with alignment and ordering. I cannot believe that anyone on /. honestly loves a language that defines which of its behavior is undefined and unpredictable.
You can write both garbage and poetry in any language. Cobol at least *tried* to make some things clear.
I'm a programmer, I have no soul. Management has eaten it decades ago.
I've seen hell, and it looks surprisingly like an executive board room. - Lao Tzu
IBM. Your prospects of working for it are greater and that's a career risk for me.
In the late 90's COBOL consultants were paid big bucks to fix the Y2K (non) problem. Now they get good money for replacing all of the retiring baby boomers. And since nobody in India seems to know the language (and there's zero interest in universities teaching it), I think job security would be excellent. It's a great niche to fill.
Until you realize that you have to go back to the world of Packed Decimal and EBCDIC - no thanks!!!
Once I was a four stone apology. Now I am two separate gorillas.
The best use of goto is for an orderly cleanup of resources. If something goes wrong partway through acquiring all the necessary resources to do a task, you just "goto" the appropriate stage of the cleanup. See http://programmers.stackexchange.com/questions/154974/is-this-a-decent-use-case-for-goto-in-c/154980#154980 for example.
It's also good for breaking out of multiply-nested loops, for checking a bunch of possible error conditions before starting the meat of a procedure, etc.
In the '90's I was working for BigTelCo on an ordering system.
Unix / C system "A" would enquire about account details based on any of various inputs (account number, main phone number, etc.). They sent a transaction to a central system "B" app server for which I wrote about 1/3 of the code. Well over 90% of system B was COBOL. Typically we were running about 0.7 sec response times. During that 0.7 sec, our system would:
ID the type of access inputs, look it up in an IMS database, figure out which datacenter (Georgia / Florida / Kansas / Colorado / Massachusetts) had the account, send the transaction there.
Pull the transaction, call a dynamic table to see what data were required (could be changed w/o recompiling or bouncing system), pull the data, create stream-style (not block I/O as the mainframe was used to) data, send it back to Unix for parsing.
Did I mention that part of the routing, and all the dynamic tables, were provided from software written in PL/1? So our COBOL modules were linked with PL/1 to create the final executables.
That's not the most clever or the least wanky system I've ever been on, but the old COBOL girl did pretty good. The Unix / C folks got intelligible data as soon as they figured out how to tweak HP's EBCDIC-to-ASCII tool so the non-alpha, non-numeric characters would be handled. And at that point the data stream looked just like what they'd been passing one another, from C to C.
And yes, the last time I heard, people were still creating wrappers around the mainframe system's feeds so that other C / C++ systems could use the data.
This is yet another article planted by MicroFocus. One more time, with feeling:
NO ONE WANTS COBOL PROGRAMMERS!
COBOL by itself is a useless skill. What companies want to hire are people who know CICS, DB2, IMS, ISPF, and so on. They do not want COBOL programmers other than COBOL is the easiest language to interface with these enterprise products. If you know only COBOL, you will not get a job. A company wants to hire a CICS programmer who knows how to interface with VSAM files and DB2. The language happens to be COBOL, but unless you know everything else you won't be hired.
MicroFocus has the COBOL compiler, and IBM has a DB2 UDB for every platform other than the mainframe. But almost 100% of COBOL development is going to be on the mainframe, and you'd better know CICS, DB2, etc if you want to make a living using COBOL. Articles planted by MicroFocus never mention this fact. COBOL programmers are not in demand. CICS programmers are.
I'm working on a git client written in COBOL and need help with the Beowulf drivers.
The Russians have won. They have made the world a cesspool of distrust, greed, fear and hate.
The money better be very, very good.
didn't know about cobol until i saw this article. i keep hearing about C++, Java, python and lua. just saying. i don't think the local college offers COBOL. maybe the bigger one has classes in cobol..
guess i'll go read about this programming language even though i'm not programming a business application.
Y2K problem? think i heard of it. ok, i'm starting to show my age. lol
that, and assembly.
My assembly I forgot with time, but COBOL will take a 9mm to remove.
So rise up, all ye lost ones, as one, we'll claw the clouds.
used to be a COBOL programmer for first 2 years when I started my career, when I was looking for a change ....it was not easy to find a job in COBOL and not even other technologies cause I got labelled as dinoasaur ... a simple check on linkedin, indeed monster results very few results, so unless you are planing to get yourself cornered, COBOL is not a good idea, yes companies need COBOL programmers, but the moment you are laid off it will be difficult to find a job cause there are not many cobol jobs..
Spend some time doing COBOL programming after college; it was on a HP of some kind.
About the only thing I remember about it was the UI generator. You could design the screen, move stuff around, etc and it was character based. The best thing about it when you put down a field and then bring up a seperate properties screen and set the input, using a regular expression for custom fields put out different error messages for different condition and testing different condition. You could set what the output would look like, comma, dollar signs, # of numbers after the decimal, etc. and when the user went to edit the field all that output formatting would be removed until they left the field.
My kingdom for some mod points! AC has got it right. No one cares about COBOL programmers... it's all about the COBOL interfaces. You can learn the COBOL language in a day on a PC, but if you don't have a mainframe environment to write that code in (including JCL), your efforts will have been pointless. COBOL is simply short for mainframe. When an article talks about COBOL programmers with experience, they mean mainframe programmers with experience. So, anyone thinking that they can read a book on COBOL and get a job will find themselves in for a rude awakening.
Nah, you can do it just as trivially in C, just make a struct mapping the physical record just as in COBOL. People often don't do that, but that's people for you.
Here's a homework assignment for you. What is the layout in memory and total size in bytes of the following struct on x86 and on ARM?
struct account {
short account_number;
char first_name[30];
char last_name[30];
float balance;
char account_type[3];
int ssn;
};
Ignore endianness or, I suppose, continue ignoring endianness.
If it's for-profit but free, you're not the customer -- you're the product (e.g., the Slashdot Beta's "audience").
If you don't like COBOL then you should try the object orientated version, ADD 1 TO COBOL.
Try OpenCobol before you pass judgment. Here is an exerpt from the programmer's guide:
"If you already know a programming language, and that language isn’t COBOL, chances are that language is Java, C or
C++. You will find COBOL a much different programming language than those – sometimes those differences are a
good thing and sometimes they aren’t. The thing to remember about COBOL is this – it was designed to solve business
problems. It was designed to do that in the 1950s." See http://sourceforge.net/projects/open-cobol/
Nobody posting on this thread has ever evenseen COBOL code!
OP are you from IBM or MicroFocus ?
Try googling. :0)
Visual COBOL? Fujitsu did that - I have a demo disk from somewhere around 2001.
COBOL++? Well, OO COBOL has been in existence since 1996/7 that I'm aware of and doubtless from before that. Microfocus were the first to do it that I came across, but the above-mentioned fujitsu compiler also did OO.
Did you also know that COBOL.NET exists? Oh yes. Be afraid...
-Never argue with an idiot. They drag you down to their level, then beat you with experience-
You realise that's not how a level 88 works, right?
(Hint: It would either be 'IF YOU = 1 THEN' or 'IF READ-THIS THEN').
-Never argue with an idiot. They drag you down to their level, then beat you with experience-
TRAIN people to program in COBOL? Why not just HIRE the unemployed COBOL programmers?
If your going to code this way, don't use the always-been-stupid "I don't know what size this is" C types. I've never used those in many, many years of C/C++ coding, as you never know what you'll get. There isn't even an explicit type for float (and the standard is useless), but all modern compilers use the same 4-byte format, and freely mix floats and ints in memory (the C standard allows for stuff like special memory banks just for floats that is all history now).
struct account {
int16_t account_number;
char first_name[30];
char last_name[30];
float balance;
char account_type[3];
int32_t ssn;
};
Isn't very mysterious at all. Alignment restrictions vary by platform, but you get used to them.
It's annoying that C isn't as explicit as asm or COBOL when it comes to data structure layouts, but if you work on one platform for a while the compiler won't surprise you. It's more annoying that you have to use odd #pragmas or unions to force explicit alignment, but in practice you just pad stuff out for clarity.
struct account {
int16_t account_number;
char first_name[30];
char last_name[30];
char _0[2]
float balance;
char account_type[3];
char _1[1]
int32_t ssn;
};
Most real-world code tends to arrange fields to minimize space lost to alignment needs anyhow, so you don't get much padding.
And if you're worried about stuff like endianness or other cross-platform quirks, you obviously don't want to be rolling COBOL style.
Socialism: a lie told by totalitarians and believed by fools.
Summary:
* COBOL isn't evil. It is good for its domain. It is very good for nested data structures.
* An example is given that goes beyond the typical.
* I claim not to be a COBOL bigot.
* I explain where COBOL programmers came from originally.
* There are some aspects of COBOL I like.
Don't be disrespectful of the elder languages just because their domain isn't what you work on.
COBOL programs are probably handling your payroll, bank, and investment accounts.
Details:
>> For those of us who are unfamiliar, could you describe what it is that COBOL does that other languages don't cover as well?
and
>> Pages and pages and pages of foreplay before you get any action.
Yes, there is stuff at the top that is largely documentation followed by a FILE CONTROL SECTION with information about the files to be used, and then the DATA DIVISION. In many cases, the DATA DIVISION, the part of the program that describes the variables, condition codes, and data structures is larger than the procedural logic.
Most of the discussion here has been about the procedural code in COBOL programs, not the DATA DIVISION and its structures. One can accomplish very interesting things with the hierarchic data structures of COBOL and PL/I. The following example shows how to march through a variable length record containing instances of 2 kinds of variable length segments, each of which could appear many times. It leaves out some of the boring stuff.
77 OFFSET-1 PIC S9999 USAGE COMP-3. .... .... .... ....
01 LAYOUT-1.
03 LL-1 PIC S9999 USAGE COMP-3.
03 BB-1 PIC XX USAGE DISPLAY.
03 FILLER PIC X OCCURS 0 TO 4096 TIMES DEPENDING ON OFFSET-1.
03 SEGMENT-LENGTH PIC S9999 USAGE COMP-3.
03 SEGMENT-TYPE PIC XX USAGE DISPLAY.
88 TYPEAA VALUE "AA".
88 TYPEBB VALUE "BB".
03 AASEGMENT.
05 FIRST-FIELD
05 SECOND-FIELD
03 BBSEGMENT REDEFINES ASEGMENT.
05 FIRST-FIELD
05 SECOND-FIELD
PROCEDURE DIVISION.
open the file
PERFORM UNTIL EOF-1
READ FILE-1 INTO LAYOUT-1
SUBTRACT 4 FROM LL-1 GIVING OFFSET-1
PERFORM WITH TEST BEFORE UNTIL OFFSET-1 >= LL-1
IF TYPEAA THEN
blah blah blah
END-IF
IF TYPEBB THEN
blah blah blah
END-IF
* slide over to the next segment
ADD LL-1A TO OFFSET-1
END-PERFORM
END-PERFORM.
Admittedly, this is not your typical COBOL program, but stuff like this can and is done with COBOL when necessary. My first real COBOL program read 7-track (6 bit characters + parity) tape where there were multiple variable length records within a block. To process the records on an IBM mainframe, I had to deal with the fact that the lengths were 12 bits that had been read into two 8 character bytes, so the length was really byte0+64*byte1. All this was doable in COBOL. Once I got the data out, I did the first level of analysis in FORTRAN and the fun stuff in APL.
I wouldn't try to create and select from the 4 dimensional outer product of 4 vectors in COBOL, and I wouldn't and didn't in FORTRAN, as long as I had access to APL.
When is COBOL a preferred choice:
* When the data structure definitions are many and many are subsidiary to one another.
* When it's what the example is writt
If you want to play with a free compiler, try OpenCOBOL at http://www.opencobol.org/.
There is a list of other free COBOL compilers at http://mainframewizard.com/content/free-cobol-compilers but some of them look pretty old.
Very nice, but what does that have to do with the language itself being horrible until they started nailing features onto it?
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
Features like stream I/O support were in COBOL in the 80's / 90's. As was linking compiled COBOL to compiled non-COBOL. It was one of the very first portable languages (per Wikipedia). Substringing and multidimentional arrays were easy. And when I took my years of COBOL to C++ class, the instructor told me I was "too structured" - the COBOL I'd been writing was more structured than the C++ he was used to seeing. While a lot of people only needed simple COBOL, it actually had a lot of advanced features available back in the late 80's.
Back in 1961, if you were trying to create a billing system for a big company, your options included COBOL, Fortran, assembly language and not much else. Programmers in the 60's were grateful for the ease of COBOL when used in a business setting, which (back then) consisted mostly of reading punch cards and creating pretty reports for pointy-haired bosses. COBOL made their lives much easier at that time.
Easy to write, easy to structure, very versatile, capable of doing menial tasks to tons of data quickly. Doesn't sound too bad to me.
Most computer languages are horrible if you choose to make them horrible. My point is that you don't have to make COBOL horrible, and most COBOL programmers don't.
It's more typing than most languages...but it's not horrible unless an inexperienced programmer chooses to make it horrible. Or unless you haven't spent much time with it in a business environment.
Yes, the PROCEDURE DIVISION looks clunky.
COBOL lives by its DATA DIVISION. That's where the magic happens.
And good COBOL can be written like unix, small modules that do one thing well.
It just needs a humungous job scheduler to lace them together into a production system.
Been there, done that, fixed it for Y2K.
--
You can trust me -- I'm from the Internet.