So, should I learn COBOL?

Becoming a COBOL expert could give you a well paid job for life, but is it a job you'd want?

Reliable, uncomplaining types who get quietly on with the job rarely find themselves at the centre of attention. So it is with COBOL, which has been running data intensive big business systems in banks, health services, insurers and governments since the 1950s, a time that might as well be a different geological era. Once in a while, though, something happens that remind us of its existence. Last month, the US state of New Jersey was shocked to discover that no-one really knew how to program its unemployment insurance system which was suddenly creaking under massive demand due to the pandemic.

As with previous wake up calls such as banking crashes, this prompted a spike of interest in the venerable programming language among people who would normally be focused on Scala, Go or Rust. COBOL's Facebook page and LinkedIn groups have been adding members at a rate of knots, according to Derek Britton, product director at COBOL vendor Micro Focus.

So, should developers be looking to a 60-year old language for their next job?

RUN.

Become a COBOL guru and, depending on your age, you could have a job for life. COBOL may have been around for 60 years but it has another 20 or 30 years left in it, at least.

COBOL continues to evolve alongside other business technologies and is no longer confined to mainframes. Modern COBOL can run on desktops, in the cloud, on the Java Virtual Machine (JVM) and .Net, alongside C#, with JSON and XML - and even in containers.

For example, software vendor Advanced placed its e5 accounting system (originally developed in the 1990s and featuring 40 million lines of code), in Docker containers and thence to AWS to create CloudFinancials.

COBOL supports object orientation, REST APIs and can be used with IDEs such as Visual Studio and Eclipse, and neither the shouty capitalisation nor the considerable acreage devoted to boilerplate are necessary these days.

What's more, because it was designed for business users rather than computer scientists its syntax is close to written English, so it's easy to see what a program is doing and, as a bonus, it's also more-or-less self-documenting. And while the structure may be different to more modern languages, it is not considered difficult to learn.

UK organisations running COBOL are sitting on an average of 12 million lines of code

COBOL underpins payroll systems, bank accounts, credit card networks, mortgage and insurance systems. The HMRC tax system, Lloyds banking systems and Aviva insurance systems all feature COBOL code. The language underpins nearly 95 per cent of ATM transactions, according to Reuters; an "estimated $3 trillion in daily commerce flows through COBOL systems".

UK organisations running COBOL are sitting on an average of 12 million lines of code, according to a recent survey by Micro Focus. That number may be partly due to COBOL's notorious verbosity, but the important thing is, no-one's going to be refactoring 12 million lines in a hurry, particularly given the mission-critical nature of the applications. Instead most organisations opt to update and modernise their COBOL systems, adding security, encryption and access features, migrating to new hardware and generally greasing the cogs and wheels to keep the code running smoothly.

So, there's no shortage of demand. Currently, COBOL skills pay about average but that is expected to rise as more practitioners retire and scarcity increases in big banks and insurers.

Modern developers are encouraged to think more about the data and the end user, and COBOL has a head-start over other languages in that it's data-centric by design, said Britton. "You can't do a single piece of work before defining the data that you're going to act upon in a way that is very explicit. Not many languages start with that sort of data-centric or business-centric perspective."

There's also an open source version, GnuCOBOL which transpiles COBOL to C bytecode, handy for those who don't wish to fork out £5k on the compiler.

WAIT.

COBOL is fast, robust, stable and in demand. What's not to like?

Well, those suffering from RSI will not appreciate the high number of keystrokes still required compared to a more modern language. That said, the code is more reusable than it was and there are examples of organisations selling modules to others with similar needs.

But COBOL would be an unusual first choice for developing a business application today. For one thing it is difficult to recruit experienced staff, and for another "it's not well suited to the needs of modern apps with high quality user interfaces", according to one CIO we spoke to. In addition, COBOL is best suited to big batch processing jobs which these days can be easily carried out using more widely languages, typically Java or C++/C#.

It continues to exist on account of the massive investment in existing code

The only reason COBOL occupies the position it does is that it was adopted across the board by large organisations in the 1980s to support the mission-critical operations that were then key differentiators. Luckily, it's a job it continues to do well. Extending the life of these systems is cheaper and certainly much less risky than rewriting them. The history of rewritten COBOL apps is not a happy one, with some experts estimating a 75 per cent failure rate. This gives COBOL a stable user base - but that's not the same thing as being popular.

"It continues to exist on account of the massive investment in existing code which would cost millions to re-write for little benefit. If the code works you keep it - and so COBOL persists," said one IT leader.

Maintaining COBOL code might be a challenge at first, but there are plenty of mature tools to aid in the task, and you won't be alone (probably). COBOL vendors like Micro Focus and industry groups such as the Linux Foundation's Open Mainframe Project are making a concerted effort to steer a new generation of COBOL programmers through the education system.

STOP.

Among developers COBOL isn't cool, not even in an ironic way. It's not retro chic, it's legacy. Mostly it's just ignored. So, don't expect your new career to take you anywhere exciting beyond the end of a pleasant cul de sac. If you're serious about venturing into COBOL, it's best to have other strings to your bow just in case.

COBOL's home is the back-office where it quietly munches through data. This will be your home too, and the closest you'll get to the glamour of a customer-facing website will be writing connectors from your domain to theirs.

Mainframes aren't going away any time soon, but they're not going anywhere new either, and while COBOL can run on other machines including desktops and VMs there's less of a use case there.

And while efforts are being made to bring in new blood, the fact is that the average COBOL programmer is a 'lifer' in his 50s (yes, it's almost certainly a 'him'), and you have to wonder how successful the recruitment drive among the young will be, given the number of shinier things on offer.

The language has many arcane features that aren't really applicable elsewhere, including GOTO which was dropped from other languages long ago because of its role in creating unmanageable spaghetti code.

It's been here all this time and been happily running the world economy without fuss

That said, there's much to admire about COBOL. Since 1959 it has proved itself to be both adaptable and extremely reliable. It's also completely backwards compatible, meaning that even ancient programs from the 60s can be recompiled and executed in a new environment.

If the values embedded in COBOL - stability, continuity, utility - chime with yours, and if you could tolerate a steady job in a high-paying company, it could be just the language for you. Ignore the naysayers and see for yourself.

"It's been here all this time and been happily running the world economy without fuss for a very long time and that should be celebrated," said Britton. "But good news often doesn't make the headlines."