The 60-year-old programming COBOL is experiencing a resurgence. Many government system mainframes run COBOL and have been struggling to deal with a surge in demand. In particular, the state of New Jersey’s unemployment systems is administered by a 40-year-old COBOL mainframe.

With the surge in unemployment connected to COVID-19, the system is struggling to keep up. Governor Murphy has identified COBOL programmers as an under-appreciated necessity.

What Is COBOL?

In 1959, the Committee on Data Systems Languages designed COBOL. They wanted to design a standard programming language to run on many different mainframes.

At that time, many new programming languages were being developed, and translating programming languages to run on new hardware was becoming too expensive. COBOL, or common business-oriented language, was the solution to this problem.

Grace Hopper
Image Credit: miss karen /CreativeCommons

COBOL was based on the programming language FLOW-MATIC, which was created by Grace Hopper. It was the first programming language to use English terms for data processing instead of mathematical notation. Grace Hopper explained:

“I used to be a mathematics professor. At that time I found there were a certain number of students who could not learn mathematics. I then was charged with the job of making it easy for businessmen to use our computers.” (The Early Development of Programming Languages pg. 29)

Similarly, COBOL uses English terms and was designed to be easy to read. However, some have criticized it for being too wordy. For example, in C you might write the following to add two numbers:

        int result = 1 + number;
    

The same code in COBOL would be written as:

        ADD 1 TO number GIVING result
    

Much like C, COBOL is a procedural programming language. This simply means that COBOL programs are designed to follow sequential steps. COBOL is also a self-documenting language, which adds to its usability. However, the most well-known feature of COBOL is that can handle massive amounts of data processing.

Related: 5 C Programming Tips You Must Learn to Get Started

COBOL became widely adopted, particularly by businesses, governments, and financial institutions. So widely adopted, that it is even still used in many places today.

Despite the past popularity of COBOL, few people know the language. There are more programming languages today that centered on English commands that have a lot more features than COBOL. Few programmers create new programs in COBOL; its primary usage is to maintain legacy programs.

A criticism of COBOL is that programmers had a tendency to write spaghetti code. Spaghetti code is a derogatory term for code that is poorly structured. The primary culprit of poorly structured code was the GOTO command.

As mentioned earlier, COBOL is procedural, so the computer reads each line of code, top to bottom in order. The GOTO command allowed the programmer to tell the program to jump to a different line. Poor usage of the GOTO command can make COBOL code convoluted.

Related: How to Keep Your Code Clean With Object Encapsulation

Another reason that COBOL is not popular is that it is rarely taught at universities. COBOL was created by the business community, not the academic one. It was designed to solve business problems and is optimized for issues such as data processing. Academics are often interested in different questions, and thus, promote different programming languages.

However, one of the biggest issues with COBOL is that despite being designed to be a common language, it isn’t. As the language evolved, many different dialects were created---300 of them!

This makes it challenging for programmers to understand legacy code.

Why COBOL Is Important

Because COBOL is widely used by businesses and governments, there are still many COBOL systems that need to be maintained. Legacy code is notoriously hard to maintain because the programs are large and complex. Thus, programmers with a deep understanding of the language are needed to maintain the programs.

It also takes a lot of time to make changes to the code because it is hard to determine if the changes will affect other parts of the program.

Grace Hopper at a Computer running COBOL
Image Credit: Public.Resource.Org /Flickr

For example, in the 90s we faced the Y2K bug. Many year dates were saved in computers using the last two digits of the year instead of the full year. So, 1997 was stored as 97. It was feared that when the year changed to 2000, the year 00 would not be recognized as valid, cause issues with the date sequences, and potentially crash many systems.

It took US governments and businesses several years and $100 billion dollars to deal with the Y2k bug. It is possible to change legacy systems, but it can take time and can be costly.

In 2020, COVID-19 created a new programming problem. The US unemployment system runs on COBOL and it is very difficult and expensive to make changes to the program. For example, Congress had planned to respond to the surge in unemployment by calculating unemployment pay-outs based on lost wages. However, it would have taken five months to adjust the program to implement the calculation.

Related: Coronavirus COVID-19: 15 Sites You Can Trust for Reliable Information

COBOL systems cannot be changed quickly enough to respond to crisis situations. The problem is compounded because there aren’t enough people trained in COBOL to help with the increased maintenance required to support the systems during crisis. Those that are trained in COBOL, are either retired or nearing retirement.

Where to Learn COBOL

To help address the growing need for COBOL programmers, IBM has created a free COBOL course. The course consists of a series of videos, quizzes, and lab assignments, takes 16 hours to complete and you will receive a badge at the end.

If you are already an experienced COBOL programmer, IBM also offers a COBOL networking forum. There, experienced programmers can be connected to organizations and businesses in need.

COBOL is not a trendy programming language, like Python, but it is an important one. Much of the world still runs on COBOL. If you have been thinking about learning a programming language, but needed a push, consider learning COBOL.