8 ms·
Why and how COBOL is still used
- asguy 5y ago> Any video (sic) processing like encoding WAV-files to MP3, writing code for microprocessors like the STM32 or even writing an entire operating system with drivers is nothing that COBOL would ever be able to achieve. … hold my beer
- musicale 5y ago> I would rather run 8,000 docker containers on it than a single COBOL application Making it 1000x worse than something that would already cause me headaches and nightmares.
- VWWHFSfQ 5y agohaha that was my thought as well. That's just a different way of punishing yourself!
- quietbritishjim 5y agoThat's the point isn't it? e.g. you might say "I would rather stub my toe 1000 times than run COBOL once". The comparison only makes sense if it's something you consider to be bad.
- musicale 5y agoMy next system design will be 8000 Docker+COBOL containers.
- pelasaco 5y agoI worked in a finance institute, when I was responsible for the mainframe and mainframe security. I was 24, and I was surrounded by senior engineers, already over their 50s. I had to go back home, back to my father, to ask for help. He is still today teaching COBOL in the university. Was a pleasure to learn this language that to me was a kind of "Cucumber" from the 60s. However, looking into the details of the whole workflow from COBOL applications, I wasn't that happy looking from the security point of view. The code and solutions predates any security best practices that we have today.
- amitport 5y agoIn what way does the security best practices of the programming language are different? (I've worked at a security related startup that worked with mainframes which used cobol... The security practices of the runtime do not seem to me less advanced than what we do in other languages.)
- mumphster 5y agocobol (on mainframes, no clue if this applies elsewhere) is more than just a langauge, its a whole stack and set of tools for writing terminal UI programs basically that take inputs and do a lot of processing based on said inputs. You can easily run into cobol code that assumes (rightfully so in most cases) that people will be nice and not do bad inputs or try to do the equivalent of sqli. the attitude around safe and secure code just wasnt there when a lot of the cobol codebases ive ran into were initially written
- pelasaco 5y agoexactly at least until 2000s, there was no secure copy, but anonymous ftp or reading password from a plain text. Processed data was being pushed to some public areas from where other job would read it..A nightmare.. but worked.
- tuatoru 5y agoThat doesn't match my experience. Over half of the code I worked with was input validation (format validity, value plausibility, authorisations). Most of the rest was post-facto batch checks for the same sorts of things, except more. Any CRUD code base that has been in use for a while is mostly this kind of thing.
- teh_klev 5y ago> I would rather run 8,000 docker containers on it than a single COBOL application The author surely realises that there's this thing called LPAR and z/VM? And that you don't just run a "single COBOL application" on one of these boxes?
- SavantIdiot 5y agoBanaMex's core runs on VMs that still run COBOL. (Source: I met one of the debuggers while I was in Patagonia. He is in his 70s and sails around the world with his wife and fixes bugs when he's near WiFi. Either he was telling the truth, or he's a really good storyteller.)
- teh_klev 5y agoHe wouldn't happen to be called Edward?
- klelatti 5y agoI have to admit that I don’t fully understand why COBOL is so difficult to replace. If the systems are so vital surely there is a detailed specification and writing in an easier to maintain language would repay the effort? Is it just that there is so much COBOL and it’s not worth the effort? Edit : thanks for all the great replies - HN at its best!
- mywittyname 5y agoI bet there were numerous failed attempt at modernization with these platforms over the years, and after wasting enough money/resources on them, management made a blanket decision of No More.
- nzach 5y ago>If the systems are so vital surely there is a detailed specification In my experience those things not always go together. I've seen "mission critical" software with basically zero formal specification. Maybe this also happens with COBOL?
- wongarsu 5y agoI imagine this happened especially in COBOL, a language designed to be easy to learn so that business people can write their own subroutines instead of solely relying on programmers.
- rbanffy 5y agoIt was the same idea of DSL's. If you bring the language very close to the business domain, the program and the spec are very close to one another. Didn't quite happen in COBOL's case.
- ahofmann 5y agoI think you greatly overestimate how well software is documented. Just one example: When the Y2K problem was discussed in the late 90s, one of the big problems was that almost nobody understood the decades old code base. They hired experts, of course, to make sure there were no difficulties when they switched to the year 2000. They made such hair-raising discoveries in some code trees that a lot of the variables had completely useless names, like "Mickey Mouse".
- scastiel 5y agoAnother good article about the same topic: “The Code That Controls Your Money” by Clive Thompson https://www.wealthsimple.com/en-ca/magazine/cobol-controls-your-money https://www.wealthsimple.com/en-ca/magazine/cobol-controls-y...
- vajrabum 5y agoI'm quite surprised to see no mention of CICS which is the event driven framework originally for special IBM terminals. This is a highly performant transaction monitor and still widely used today in large, established companies. By today's standards this framework isn't that difficult, but it's not something you're going to master in a day either.
- tuatoru 5y agoFor a long time it was also the largest program that had been formally verified. Not sure if that is still the case.
- WesleyJohnson 5y agoThe company I work for has a massive COBOL legacy codebase which still handles the lion's share of our day-to-day operations. In the several years that I've been here, we've started migrating some functionality (reporting, etc) to a web-based application, but there are very-real tradeoffs when you start looking to migrate interactive processes away rom COBOL into a web application. Keyboard navigation and raw speed are two things that come to mind that we simply can't match. Curious if anyone has been tasked with replacing COBOL applications and what you eventually used to do so? Being of the web-programming persuasion, I was thinking Electron or Reactive Native for Windows to build something where I could have more control over the navigation experience and then focus heavily on keyboard navigation in the app. The business likes more interactivity, more visual UIs, but sorely misses what I mentioned above COBOL (or terminal-style) applications in general. Curious where a happy medium might land in terms of language/framework.
- a2tech 5y agoYou can absolutely make a web interface that is snappier (not quite like a terminal application). You need to spend a lot of time with your layouts and jettison a lot of your web assumptions (like using javascript for a lot of things, spending a lot of time on tab progression, and forget about responsive designs). My current job when I started maintained a web app for a medical research outfit. The person that developed it came from a COBOL/RPG background and applied that knowledge to this application (which required tons of data entry via web forms). It was a python backend, minimal JS on the front end, and our data entry folks could fly when they were entering data. The endpoint that the data entry screens pointed to were implemented with speed in mind so saving a form was almost instant (from the user perspective).
- WesleyJohnson 5y agoThank you for the anecdote. I'll have to do some more research in this area. We're using Django on the backend and minimal JS on the frontend already, though we have introduces some React in certain areas. I think, as you stated, we just have to double down on layouts, tab progression, etc and rethink what we think we know about web applications.
- Digit-Al 5y agoBack in the late 80's I actually had a COBOL compiler on my 8-bit CPC-464. The CPC-464 had a port at the back that you could connect an EEPROM box to. I had an assembly compiler, a COBOL compiler, a BCPL compiler, and a C compiler on it at various times. At the time it was awesome to be able to just switch on your computer and go straight into your compiler with absolutely no loading times at all.
- tyingq 5y agoFor the most part, it's not the COBOL itself that makes it hard to port. It's the features of the surrounding OS for things like screen layouts, batch process management (not cron like, but deep job dependencies, etc), database management, file transfer, user management, etc. So to port the app, you have to know quite a lot about what things like RACF, TSO, CICS, JCL, Tivoli, Adabase/IDMS/etc, are contributing to the overall app. Porting the COBOL is sometimes not even half the effort.
- mrjin 5y agoPeople tend to think migrating an application is all about rewriting the program itself. But actually rewriting is only a small fragment of efforts needed. For some large organizations the legacy code base is so large that it would be crazy to rewrite them in a different language in the first place. This does not event mention the effort to test or validate if the new application works as expected. Put those thing aside, building a new infrastructure with PC servers and hire/retrain the operations would almost much larger than anticipated by most of the people. After evaluating all the options, scale up/out with MFs would be the cheapest and most reliable solution to provide more capacity for a perfectly working application. IBM has done a decent job on keeping MF backward compatible. There are lots of core banking systems running S360 Assembly applications on latest MFs today, in comparison, COBOL is not that old at all.
- prajwalshetty 5y agoTrue, I started as a COBOL programmer (did a lot of TELON online screens, JCL, CICS, DB2...) as my first job in 2009, for a biggest retailer - personally it taught me a great deal of software engineering - having a background in electronics engineering helped I guess. The whole stack, and the complex business built around it over many years makes it so difficult for these large institutions to port their solutions on to a new platform in my experience too. For a lot of these companies, these backend systems on Mainframes just works and I believe there isn't a proper incentive to move on to a new platform anyway.
- partomniscient 5y agoThere's DB2, and then there's IMS-DB/DC... COBOL itself isn't too difficult to pick up, its the rest of the infrastructure around it. JCL is particularly unforgiving. I'm in total agreement with the parent post of this thread. I think the thing that bugged me the most about COBOL is the difference between END-IF. and END-IF Everything else was onerous compared to other languages but relatively straightforward. It's not something to get a simple job done quickly in though. The simplicity created by things largely remaining the same over time in mainframe world is one of its core strengths.
- js8 5y agoI work on mainframe, specifically on a tool for tracing large applications running on z/OS systems. I don't completely agree with the conclusion. It's true that MF tech stack (z/OS, COBOL, CICS, DB2, ..) has many warts and is not fashionable. But I think you can write applications for it in the modern way if you want to; I think the backward-compatibility allowed IBM to focus on continually improving the stack rather than chasing latest fashion. As someone quipped, these little COBOL programs communicating in CICS MRO do resemble microservices or lambdas, and JCL/RDO is just infrastructure as code. So many of the "modern" concepts have been there for decades now, and they let you do transactions very reliably. But I want to point out, interestingly, what gives us real headache are the modern applications that are NOT COBOL. They tend to call databases with dynamic SQL (basically the plan is created during execution), and this makes the undesired application changes quite difficult to trace. In old-fashioned COBOL applications, you compile your query plans with your application, and that makes the performance more predictable. So I wouldn't be surprised if traceability is a big thing that COBOL and MFs have still going for it. There seems to be more middleware tooling for that, and things have been standard for many years. Unix tools seem to be more fragmented, although I have no doubts there is lot of good commercial tools. In cloud, everything seems to be even more tied to a single vendor than mainframes - I am not even sure if it's possible to run 3rd party utility on your deployment. It looks like if you really want traceability you have to do it yourself. Overall, I think MF stack is very decent (although not so shiny on the outside) and I wish IBM would promote it more.
- klelatti 5y agoPresumably cost is the biggest issue preventing MF adoption for new users - hasn’t the hardware and software been IBM’s cash cow for a number of years?
- js8 5y agoThat is true. IBM literally outlived its competitors, though. It's somewhat sad to see this technology fading away due to greed. I wonder if the same is going to happen with newer companies, the software reinvented again. Had we have copyright lasting only for 20 years (like patents), it would be possible to legally run first version of z/OS today.
- 0xcoffee 5y agoIs there any higher level language that compiles down to COBOL? Seems like there would be market for such a thing.
- joncp 5y agohttps://archive.md/B97v0 https://archive.md/B97v0