The programming language COBOL conjures up images of thin ties, white shirts, spinning tape drives, and all of the glory and pain of the mainframe era. This only makes sense because the language first appeared in 1959 and it was one of the dominant ways to code in the 1960s.
Today, it’s often forgotten, but not because it’s disappeared. Other languages for other roles grabbed the spotlight, riding the technology boom as computers proliferated. COBOL didn’t fade away, though; it was merely eclipsed by the explosive growth of the other languages and technologies.
Indeed, people who work with COBOL in 2022 say the demand is higher than ever. It may never capture as much attention as the languages used to, say, create apps for billions of smartphones, but it has a stable and slowly growing home in the corporate offices where it began.
Micro Focus, a company that writes plenty of COBOL code, sponsored a survey run by Vanson Bourne in February 2022 that estimated there could be more than 775 billion to 850 billion lines of COBOL code running currently. Back in 1997, a study by Gartner put the number at 200 billion. It may not be the same growth on a percentage basis as languages such as Python or Swift, but it’s enough to keep plenty of programmers interested.
“It’s an IT backbone for most of the Western world.” said Ed Airey, product marketing director for COBOL at Micro Focus International. “Most of the things that we just frankly take for granted every day, like being able to take money out of the bank using an ATM or book an airline ticket for vacation or get an insurance quote, depend upon COBOL running quietly in the background.”
COBOL’s many updates
The language running today is very different from the one programmers encoded in punch cards. While much of the old structure and style still remain—backwards compatibility is essential—many of the new versions are updated to simplify working with all of the other languages and protocols used today.
The changes have tracked the mainstream of computer science, lagging behind a bit, but only by a few years. For instance, object-oriented COBOL appeared in 2002, and IEEE 754 standards for arithmetic joined the language in 2014.
“It’s still here primarily because all the stuff that people created decades ago and can still run today,” said Scot Nielsen, director of product management for COBOL at Micro Focus. “You don’t have to throw it away and start again. You can build on top of it.”
Indeed, many popular platforms don’t do a good job of ensuring that code continues to run longer than a few years. Apple, for instance, included a PowerPC emulator known as Rosetta in its operating system when it first switched to the x86 architecture in 2006, but it dropped it with version 10.7 of MacOS in 2011.
The COBOL community is devoted to avoiding this kind of problem. The code can now run easily on desktops or even smartphones. There are containerized versions that make deploying the cloud simpler.
Open-source projects such as CobolScript let you run COBOL in a browser or a Node.js application by converting it. GnuCOBOL creates native executables with LLVM that can run in many different environments. The lightweight virtual machine GraalVM is a good foundation for linking COBOL with other languages, including Java and Haskell. Visual Studio has a plugin called Visual COBOL for linking .NET and other Microsoft technologies.
Programmers focusing on the core language
While the community celebrates keeping pace with modern standards, it sometimes frets that the path is not always smooth or quick. Some grouse that the COBOL 2002 standard, for example, was never completely implemented because there was not enough perceived demand for the new ideas. Others don’t like that COBOL 2014 made some major features optional.
Indeed, developers say that they find the best solution is to concentrate on the core language and use the best techniques and idioms that were common from the beginning. The new features are nice and often useful, but they should be used with care and the understanding that they can take some time to reach maturity.
“People that are versed in COBOL and have worked with it in legacy systems pretty much stick to the procedural-type COBOL,” said Jon Stahl, a programmer at Sammons Financial Group. “But if you have somebody that doesn’t have experience in COBOL and they’re experienced in C#, when they switch over to doing COBOL, they’ll do it in a C# style. It’ll look more like your object-oriented–style programming.”
The range isn’t just limited to style. More and more COBOL projects are taking advantage of tools that simplify linking the COBOL code with other languages. It’s pretty easy to start with a COBOL project and link it to Microsoft libraries and languages via Visual Studio. There are also a number of enhancements that bring modern data formats such as JSON to COBOL to simplify the work of integration.
“It just pains me to see companies rewrite old code when they could take advantage of what modern COBOL could do with it,” said Bob England, a COBOL developer and president of England Technical Services. “It’s silly to talk about the age of code. Logic doesn’t deteriorate. Until the business rules change, that code is as good as the day it was born.”
One major challenge for the COBOL community is a lack of support and interest from the university-based computer science community. There are few courses in universities, and many programmers either learn on their own with textbooks or via some independent courses.
The rise of the online educational marketplace is changing this. For instance, Coursera lists 35 COBOL-related classes, and Udemy offers 98. Official integration with the accredited university curriculum isn’t necessary anymore. These opportunities are more flexible than courses at a brick-and-mortar university.
Some of the COBOL vendors also nurture new talent. One place to take a first step in COBOL at no cost is microfocus.com/en-us/products/visual-cobol-personal-edition/overview.
“You still need to have a background in Java, .NET, or a modern-day technology stack, but learning COBOL would not only set you apart from the field,” said Micro Focus’ Airey. “It would probably put you in a position to command a very competitive salary.”