Learning COBOL: A Journey for the Modern Programmer (2021)
monadical.com
monadical.com
A on of insurance companies, banks, telcos, airlines and old government systems for anything related to healthcare and taxes still use it and it's not all IBM Mainframes. I think IKEA just recently migrated away from it but a lot of companies with old inventory systems still do use COBOL.
The language is easy, systems and products gigantic, your mentors write their code (incl. Java) in a 55x132 char terminal and sometimes there is even more than absolutely no documentation!
It's fun but I'll probably want to do something more modern for a while before maybe returning to the old systems.
For anyone interested to learn, I've recommended think Jan Sądek's mainframe playground before ( https://mainframeplayground.neocities.org/ ).
Keep an eye on IBM's "Master the Mainframe" and hobbyist licenses for OpenVMS. I found setting up GnuCOBOL in a nice way was too much of a hassle to recommend.
Random question. Will that weird looking 'a' render on a mainframe? EBCDIC?
Many do odd contract jobs that are extremely high value; i.e. come in a fix this super big bug or add this super important feature on a COBOL system at an extremely high day rate because its hard to find people with appropriate skills.
Anyway... years later my scope had increased to include some mainframe teams working in COBOL. I have always been a big believer that you can't effectively lead a team if you can't do the job, so I dove in and learned COBOL. Now, I am not saying that COBOL and SQL are syntactically similar, but the experience of building in COBOL was very similar to building application logic in SQL. None of the abstractions we are used to, and no real concept of separation of concerns. It was fairly easy to build in, but an absolute nightmare to maintain.
COBOL was fine, ultimately. Clunky, but functional. CICS was less fine, but still something you could adapt to. JCL was _miserable._ I honestly cannot remember why, I've blocked as much of it from my mind as I could, I suppose, but I remember every part of JCL being awful and no fun to work with.
Never used COBOL section though, but everything else was excellent: jcl, Fortran and how to operate the equipment. The Russian translation was THE main programming textbook in Moscow State University in 1970s.
i think it would be more accurate to say that dividing punched cards into predefined fields was a pre-existing practice (dating back to the census of 01890) which was unthinkingly copied when punched cards were adapted to applications for which it is a stupid idea, such as programming
it's true that iterating over the leading blanks on a free-form card to find the first nonblank character takes more cpu time than just looking at column 8, but those cpu savings are so minor as to be lost the first time a compiler run has to be aborted because someone accidentally punched their statement starting in column 7
cobol, being a dod initiative, didn't care much about whether ideas were stupid as long as they could be made to work, and hci (and even ergonomics) was still in its infancy
(what would i know about unthinking copying? well, just last night i formatted my code to fit within 80 columns, ultimately because that was the width of ibm cards, and therefore of many printers, terminals, and character generators, and is still the default width of many terminal emulators)
80 characters is a nice round number that’s roughly the minimum reasonable width of a programming interface. It’s perfectly possible to code using a 40 or 60 character wide terminal, but there is significant utility from hitting 80. Meanwhile the gain from hitting 100 or 120 characters isn’t as significant.
Similarly you might have frequently used a 237 character wide editor or similar uninteresting number. Those odd numbers are simply happenstance with little reason to discover what they are or recall if you do happen to find out.
40, 64, 81, 128, or 121† would have been more logical; 72, 84, 90, 96, 108, 126, and especially 120 could be divided into equal columns in a larger number of ways; and for single columns of text, 80 is also a bit too large for optimal readability (it's about 14 words per line), but too small to fit two columns of text the way traditional book layouts do
usa typewriters commonly used 10 or 12 characters per "inch" ("pica" and "elite" respectively) which works out to 85 or 102 characters respectively across a sheet of usa letter paper, or 82 or 99 characters across a sheet of iso a4 paper, so plausibly the character width for fixed-width printers for these paper sizes had to be somewhere in the range 76-102
this week though i've been programming in proportional fonts, so the whole question of width becomes less well-defined. specifically the font lobster two because fuck you that's why
______
† 136? yes, because that's the most positive number you can represent in five trits of balanced ternary. in our timeline of course nobody uses balanced ternary, but plausibly if people had been doing this sort of optimization instead of following tradition, they'd have switched to balanced ternary 70 years ago
this should have read "121"
A modern mainframe is a thing to behold.
the cerebras wse-2 has 40 gigabytes of on-chip sram, pretty sure tianhe-1 has a few gigabytes of l2 cache, and it's common nowadays for even laptops and cellphones to have weird multi-gigabyte memories as the level in the memory hierarchy below l3 cache or even l2 cache; they just don't call it cache, and they use nonvolatile memory for the level below that
also, of the machines i listed, only tianhe-1 will have any particular trouble with earthquakes
Cerebras is a tour de force, but it's far from a general purpose computer. What it does, it does well, but you won't see it doing transactional workloads.
you won't see a mainframe running crysis either
They are, of course, built for different uses.
https://spectrum.ieee.org/mainframe-ibm-z16-telum
https://www.anandtech.com/show/16924/did-ibm-just-preview-th...
but there are like 4 or 5 other systems on top of it, some of them use XML, some html, some asp, some java, some vba, some c#.
i dont really understand the concept of a "x language job". like jobs tend to need people to learn systems and domain language, and be problem solvers, and communicators, coordinators, testers, the actual computer language is kind of irrelevant. like i cannot fathom there is a job out there where someone just hacks cobol all day and thats all they do.
Basically, all Cobol I've ever seen is firmly performing a business / functional task. I guess it's in the name :-)
Honestly, I find the whole mainframe world fascinating. Would love to learn more.
I'll always vividly remember this article from the days when I began to become entranced with IT Tech stuff... http://www.troubleshooters.com/tpromag/9712.htm
I was getting into Linux around then too so I devoured Litt's site. Shortly after I read this my cobol-programming neighbor (worked for CapOne) was laid off. As far as I know he never returned to Cobol programming (unless he managed to snag something during covid).
Besides, they show at the end that increasing the precision doesn't solve the problem, just delays it.
"A better implementation will require careful use of the Decimal package in Python."
No: a better implementation requires careful analysis of why/when rounding becomes a problem, and designing your algorithm to mitigate that.
EDIT: I just had a glance at the decimal library in python and it looks like this python "fixed point" implementation doesn't even use fixed point: it's just a decimal float. (Though correct me if I'm wrong).
[1] The COMP keyword does not convert working storage to binary, BTW.