Cobol programming language, AS/400, RPG. Cobol continues to ensure the successful completion of business transactions.
COBOL, AS/400, mainframe, RPG – Just a bunch of words that mean nothing to a young IT expert. But they are here, all around us. They do their job, they are just not as highlighted, not as sexy as a mobile app.
A Little History
The year is 1959 when Fidel Castro brings the revolution to glory in Cuba. In Hungary, Péter Mansfeld is executed for taking part in the Hungarian Revolution of ’56. Disney’s Sleeping Beauty and Ben Hur hit the theatres, and in Hungary, the first episode of Szabó Család airs. The iconic Mini appears on the roads, and Barbie dolls become available in stores. The satellite Luna 3 makes the first pictures of the dark side of the moon. In this year were born: John McEnroe, Sean Bean, Magic Johnson, Emma Thompson. Feel old yet? Moreover, it was in 1959 that the baselines of Common Business Oriented Language, presented to the world as COBOL programming language, were laid down. (The first official version was published in 1960).
You can ask why are we writing in 2021 about a story that is almost 60 years old? Only because Cobol and solutions built on it are the big survivors of IT. In an industry where 5-10-year-old solutions are ancient history, COBOL, with the stubbornness of a crocodile or a shark just won’t go extinct.
Don’t think that you can find programs written in COBOL only in the hidden corners of company data centers, concealed from everyone. According to American data, COBOL applications process 95% of ATM transactions, 96% of travel reservations, and 80% of POS transactions. In the American health insurance system 60 million, and at the Internal Revenue Service 50 million lines of COBOL code are working. In total, a COBOL code is concerned in 70% of business transactions. If these would stop abruptly, life would stop with them. In a sense it did stop in April: the governor of New Jersey wasn’t only looking for voluntary medical workers, but also COBOL programmers as well. What happened was that the State's 40-year-old system for processing unemployment benefits applications simply couldn't keep up with the sudden load increase.
There is an interesting duality in COBOL’s world today. At the time of writing this blog article, it is only in the 25th position of the Tiobe index ranking of programming languages, even Fortran outranks it. (If you don’t want to click on the link the first three on the list are C, Java, and Python). According to a study, in 2013 70% of universities didn’t teach COBOL, and COBOL programmers’ age is 55 years on average.
However, even today, around 220 billion lines of code run on COBOL a year. Besides, as we mentioned above, this software has a key role. This means, that in the upcoming years, younger developers will be needed who are not only able to do maintenance on this software but who can migrate them as well onto newer systems.
Finding Cobol developers is an extremely difficult task these days.
If you require a Cobol programmer, please do not hesitate to contact us!
TO HIRE IT PROFESSIONALS
The Birth of COBOL
COBOL was born in 1959. Every computer manufacturer (there were around half a dozen in the USA) delivered their computers with their own operating system and their own programming language. Thus, practically binding the programs to a given computer or supplier. Following an initiative (and financial support) from the American Department of Defense, a committee designed COBOL that quickly became widespread. IBM quickly embraced the language. One of the big innovations of the new programming language was syntax.
The commands were heavily based on the English language, as opposed to the codes of other languages (especially FORTRAN) which resembled mathematical formulas. The point was to let other developers and non-IT experts understand programs written in COBOL. A COBOL code almost “tells the story” what it does (almost like BASIC). The result was however a particularly talkative language that most of the programmers today find strange.
Syntax obeys very strict rules, going far enough to even determine the number of spaces before a command. This comes from the punched cards used to enter a program: Their precise elaboration was crucial.
A COBOL program should consist of four main parts, in order: identification-, environment-, data-and procedure division. The first part is kind of a meta-description of the program. The second describes the work environment. (This changes if the software is running on different hardware.) The data part contains the files and variables, while the last one contains the actual program code.
Why Does COBOL Still Exist?
Cobol can have many shortcomings. But what COBOL does, it does it very well. That’s what helped it to survive. According to an article by Robert L. Glass from 1997, COBOL has four skills that make it more fitting for the efficient execution of business tasks than most languages today.
What makes COBOL such a survivor? Simply that the programs written in COBOL work, and the programs work well. And be sure of this: IT professionals are averse to modify codes that work accurately. In addition, the programs do not only perform very well the task for which the professionals developed them. They are huge software systems: replacing, changing, restarting them is so big of a challenge, that no company wants to get into it. If it works, don’t touch it!
AS/400, IBM Mainframe, and RPG
The sturdiness of COBOL and programs written in COBOL made some computer architectures survive the revolutionary changes so typical in IT. The two most obvious examples are mainframe and AS/400; both platforms are from the company that gave birth to COBOL: IBM
It was in 1964 that IBM released its first real mainframe system, the System/360. It combined the capabilities of the hitherto separately sold models of scientific and general-use computers. For instance, decimal and floating-point arithmetic. A hardware memory protection unit separated the operating system from the running programs and the programs from one another. This way if an error occurred in one of them, it couldn’t affect the others.
After going through many development phases, IBM named the system the Z series, and besides the traditional z/OS and z/VM and others, it is now available in Linux. And take a look at that! The largest Oracle database and SAP system in the world run on a Linux mainframe.
And why? Because in some cases it is better to buy one very expensive mainframe than to buy a bunch of cheap x86 servers. One big machine can do the work of dozens of multiprocessor x86 servers, takes up a lot less space, with a lot lower need in electricity and cooling. The point of a mainframe architecture is that it uses different processors for different tasks. On a regular PC server, the CPU performs all tasks, starting from the operating system, through the application until hardware management. In a mainframe, when the processor running the application sees that the program needs an I/O process or floating-point arithmetic, it sends the task to the adequate processor. Up to hundreds of processors can comprise a mainframe. The use of them is for a different purpose.
The hardware wears the signs of the time when engineers made computers for engineers. The build is robust and redundant itself; the motherboard can be pulled out of a mainframe and it will keep working as nothing happened. A hard drive failure doesn’t affect it one bit. Reportedly, during a strong earthquake, in a Japanese data center, all the x86 broke down, the only mainframe that they had just fallen over and kept working.
The other representative of old-school IT is the AS/400 presented in 1998. AS is short for Application System; today, after IBM renamed it a number of times, it appears in IBM’s catalog as “System i”. One of its many particularities is that it was the first to have an object-oriented operating system (OS/400). In the computer, links are exclusively based on the objects name and type. The machine’s internal processes do the addressing, the programmer or the user has nothing to do with it.
Another particularity is the integration of the DB2 database manager. The record-oriented functioning of DB2 demonstrates its central role. Here the system doesn’t deal with every hit on the keyboard. It waits for the user to fill out the whore record and press enter, and then it processes it all. Meaning, that it could complete certain (and mainly) transaction tasks using up a lot fewer resources, than the other company-oriented IBM system of the time, the RS/6000 running Unix. It’s not a coincidence that it became so popular in the financial sector, that it was often referred to as an “accounting machine”.
Similarly to mainframes, the hardware of the AS/400 is hierarchical in design. Besides the main processor doing the actual calculations, there are many other processors doing auxiliary tasks such as peripheral management. With a technology called “strife-ing”, it is possible to improve the system's performance by adding additional hard drives. Another particularity of AS/400 is its single-level storage. Data storage and memory are addressed individually, and the operating system decides which elements of the database go on the hard drive, and which ones go to the memory.
This can be both a strength and a weakness at the same time. It is a strength because the size of the memory doesn’t limit the running program. It is a weakness because in case the computer suddenly powers down, the system becomes inconsistent. To avoid this, they have installed batteries around the memory.
Security is a Strength of AS/400
An important element that makes the AS/400 popular even today, is security. If one tries to modify an object using anything else than the standard procedure, the hardware bit inside “falls”. This means that it is not possible to use the object as a pointer anymore, but only as data. Thanks to this the hackers can’t attack it with overflow. The main admin password is basically the only way to access an AS/400.
Stability of Value
IBM made a lot of efforts to make their programs stable in value (option: maintain their value). The virtual command suite called TIMI (Technology Independent Machine Interface), and the translation program translating the source code in two steps both serve this purpose. The first, temporary code is the pseudo-code that AS/400 will keep in the final program. If later, the machine perceives a change in architecture or addressing, it re-runs the module on the first execution of the program. Thanks to that, a code written a long time ago can still run on newer systems. There is no need to retranslate the program, let alone touch the source code. No wonder software written decades ago still runs in many places.
The fact that shows their foresight is that all pointers are 128-bit according to the command suite, whereas the original ones used 48bit processors and addressing space; today, they use 64bit PowerPC processors. If in the future a 128bit processor appears for general use, Series I will be ready for it.
Development of AS/400
In the past years, the AS/400’s software and hardware both went through serious progress. Its operating system can be its own IBM i, as well as AIX, Linux, or, on internal blade servers it can even run Windows 2000 and Windows Server 2003. IBM i, Linux, and AIX can even run simultaneously on a computer, along with the logical partitioning called LPAR. Basically, every software needed for running and managing the system, from the database manager to the webserver is integrated into the operating system. So, while its price is quite high, you will not have to consider expenses that typically come up with other servers. While it was originally designed for terminal access, it supports client-server functions, its database is accessible in programs written in Java, .NET or other languages.
Continuous development allowed programs written decades ago to be useable on the platform even today. The banking sector chose the AS/400 with a particular love because at the time of the development of banking software (in the first half of the 1990s) this was the most reliable, the safest, and the most performant computer, not counting the much more expensive mainframes of course. More than one bank in Hungary still runs their account management system on it; there are also examples of companies who manage their accounts on other systems, but they still process their card transactions on AS/400.
It is also popular among retailer networks- there are chains that process all the data of all their units on 1 single iSeries computer. In other cases, it is used specifically as a database server because the other systems cannot compete with it in terms of speed.
Before, hundreds of AS/400 were running. Their number does not decrease as a result of applications migration to another platform. The hardware became stronger and allowed consolidation. Before, there used to be dozens of machines to meet people's demands, whereas today a single central system can do the same things, even from another country.
RPG – The Unknown Little Brother
If COBOL became an obscure programming language today, what should we say about RPG, that isn’t even in the first 50 on the aforementioned Tiobe index ranking? RPG (Report Program Generator) is a programming language developed by IBM. Interestingly, it was born in 1959, such as COBOL. It began as a mainframe programming, but later it was a high-level equivalent of COBOL and PL/I, and it became AS/400’s own “personal” programming language. (the OS/400 itself was written with RPG at the beginning, later it was readapted using C++). Originally, the professionals designed it to replace punched cards, as a result, it remains, even today a fixed notation language. In other words, there are strict limitations on what and where (lines, columns) we can write.
For the AS/400, the RPG III was used at first. But the real native programming language for the AS/400 became the RPG IV, which was integrated into the operating system. The RPG IV came out with many new features: Longer field names, source-code level troubleshooting, new types of data (floating point, Boolean, pointers), integrated features, and ILE-compatibility. The professionals designed every element of the AS/400 to serve business applications as efficiently as possible, and the RPG was no exception. As its name suggests, they did not make it for general use. It is specifically used to accomplish data management tasks as efficiently and safely as possible. However, complete bank-transaction software had also been written in RPG.