I had to deal with a bunch of mainframes in a previous job and tried to learn a bit of COBOL. One interesting thing I learned early on was that programs are almost never written exclusively in COBOL. The language isn't Turing complete (by design), so a significant portion of a program's logic will be captured in the JCL (Job Control Language) script that configures how the program will run and orchestrates multiple p…
I'm with you on the idea that mainframe COBOL is typically only part of the actual program. But COBOL not being Turing complete sounds...not right.
Ask HN: Has anyone here learned COBOL for fun?
41–50 of 82 posts
Re: Ask HN: Has anyone here learned COBOL for fun?
#42I could have gotten a job doing this work very easily. When I was applying and interviewing at my university career fair, I got a lot of interest and a couple job offers from having this class on my resume, but the pay wasn't good (small city it the south US that I wanted to leave), and I didn't want to lock myself into mainframes.
Re: Ask HN: Has anyone here learned COBOL for fun?
#43Re: Ask HN: Has anyone here learned COBOL for fun?
#44Re: Ask HN: Has anyone here learned COBOL for fun?
#45Yeah, I learned COBOL for sort-of-fun (in the sense that it wasn't strictly for a paid gig) a long time ago. It went pretty well, in that I learned that, while it isn't a fun language in any sense of the word, it Just Works and even adheres to the revered Unix principle "do one thing, and do it well" in most production situations. Most COBOL programs have a very well-defined batch-oriented flow: take this file, proce…
Re: Ask HN: Has anyone here learned COBOL for fun?
#46It's a language that's built for one purpose, business style applications like CRMs or accounting systems. It's not mystically bad or so undecipherable. It's actually a pretty simple language. If you're consulting/contracting developer, or an in-house developer at a bank, insurance company, etc., you should learn it. Even if you don't do anything with it, you can pick up a used book on COBOL and get most of the regular patterns and practices.
Learning the basics of the language itself, if you've already a competent programmer, won't take you long. Maybe a half dozen weekends. But COBOL exists in an environment (normally IBM mainframes) that does a lot of the other lifting. CICS is an application server for COBOL (essentially). JCL manages what job to run and when. VSAM for indexed files or DB2 are the most common databases. And WebSphere for messaging. Becoming a 'real' COBOL developer on a mainframe is maybe 33% COBOL and the rest a miasma of mainframe-isms. And unlike Linux, there's no 'free' equivalent to a mainframe. (Although you can spend about $40 a day accessing a mainframe on IBM's cloud).
A few weekends won't turn you into a COBOL migration expert, but you can at least join the rest of us, rolling our collective eyes, when the governor of New Jersey asks for volunteer cobalt [sic] programmers because some key system is breaking down.
Re: Ask HN: Has anyone here learned COBOL for fun?
#47I've also coded COBOL at a few places, both on PC and on mainframes years back.
But I can honestly say that I have never done anything in COBOL for the fun of it.
However this is not to dissuade anybody from ever doing this. COBOL and a few other old languages are still used in areas like banking today. So you might cross it at some point in time, even at the most modern workplace.
But as others have written in the comments, there is more to it than the language itself. You should really have a mainframe emulator (like Hercules) and other parts of the environment like CICS, TSO, ISPF and JCL if you really want to know how it feels like to code in COBOL. I don't know if it's even possible to get all of this up and running for free, but that could be a challenge in itself.
Re: Ask HN: Has anyone here learned COBOL for fun?
#48I took a mainframe class in college (2016) after my mom encouraged me to (she just recently retired as a COBOL/JCL developer of 35+ years). We learned COBOL and JCL on zOS and completed IBM's Master the Mainframe challenge. It was a very interesting experience and a different paradigm than any other CS/information systems classes I took. I could have gotten a job doing this work very easily. When I was applying and i…
Re: Ask HN: Has anyone here learned COBOL for fun?
#49I had to deal with a bunch of mainframes in a previous job and tried to learn a bit of COBOL. One interesting thing I learned early on was that programs are almost never written exclusively in COBOL. The language isn't Turing complete (by design), so a significant portion of a program's logic will be captured in the JCL (Job Control Language) script that configures how the program will run and orchestrates multiple p…
Re: Ask HN: Has anyone here learned COBOL for fun?
#50I had to deal with a bunch of mainframes in a previous job and tried to learn a bit of COBOL. One interesting thing I learned early on was that programs are almost never written exclusively in COBOL. The language isn't Turing complete (by design), so a significant portion of a program's logic will be captured in the JCL (Job Control Language) script that configures how the program will run and orchestrates multiple p…
I'm with you on the idea that mainframe COBOL is typically only part of the actual program. But COBOL not being Turing complete sounds...not right.
The COBOL spec doesn't allow recursive "paragraphs" (functions), though some implementations support it. (This may no longer be the case, or this limitation may have been specific to the language version used at my job.)
The main limitation is I/O, though. You typically use JCL to indicate what files/DBs a program will run against, and I recall that everything that touched the network was written in Java and called from JCL (whether this was because networking libraries don't exist in COBOl or because those that do are terrible, I couldn't say).