Mainframes 360
The one stop destination for System Z professionals

Sunday, December 23, 2012

An Essay – The History of the Cobol Language

World War II - A Mathematician's War
In the year 1942, America officially entered World-War II. The United States of America firmly believed that, the war could be won by advances in science and technology. The first world war was about chemical warfare. The World-War II was a mathematician's war. A lot of girls pursued a degree in Mathematics. Women mathematicians and scientists were recruited by the US army to do ballistic calculations. They used hand calculators to solve a long list of equations. The results of these calculations were compiled into firing tables. The soldiers on the field used it to aim their artillery. Before the invention of the electronic computer, the word computer(one who computes) was a job-title. These women were called Female computers. The time required to solve a problem was often estimated in "girl hours". These female programmers helped America win WWII.

Women computers of WWII(Source: Physicist Feminist blog)

However, additional wartime pressure created the need for faster computing. Prof. John Mauchly thought of building a machine to calculate ballistic tables. It was the ENIAC. Engineers at IBM too had built the MARK-I(Automatic Sequence Controlled Computer) by February, 1944. MARK-I could solve a wide variety of problems viz; integral calculus, solutions to simultaneous equations, derivatives etc. In these crisis times, Thomas Watson, the then president of IBM gifted MARK-I to Harvard University in May, 1944.

The Harvard MARK-I : An Electro-Mechanical computer(Source:

The NDRC(National Defense Research Committee) established in 1940, engaged the nation's scientific and engineering talent in war-research. NDRC contracts were awarded to universities like Harvard, MIT, generous grants were given. Harvard alone had bagged more than one hundred research projects. One such project was the Bureau of Ships Ordnance Computation Project. The Navy also leased the MARK-I and paid a rent of $800 per month.

Grace Hopper - her first encounters with MARK-I
Murray Brewster Grace Hopper had pursued her Phd. in Mathematics from Yale University. In 1943, she voluteered to serves in WAVES - a special division of the US Navy entirely for women. At the time, mathematicians considered themselves lucky to get posted at a research installation. Hopper was posted to the BuShips Computation Project, Cruft Laboratory, Harvard. Here, she encountered the MARK-I. Hopper was given a code-book. Hopper had to program the MARK-I computer, headed by H. Aiken. Hopper worked on ingenuous problems like calculating interpolation coefficient of the arc tangent series. This was to compute rocket trajectories. Hopper also worked on another problem, where magnetic mines are set off by metal ships.

The MARK-I had just seventy-two words of storage. Some extremely large problems had to fit in just 72 words of storage. Given these constraints, it was challenging to operate the MARK-I. Hopper found the slowness of programs frustrating. Everybody wrote their own programs to solve a specific problem. Hopper was always looking to speed up the writing of code. She maintained a catalog of sub-routines, which could be reused. Later, if someone wanted to perform the same task, they'd copy the routine into their own program.

Soon, more complex calculations required additional storage space. The MARK-II was built with Two Hundred words of storage. The Mark-II was an electromechanical computer and had 13,000 relays. One day, the MARK-II stopped working, as one of the relays had failed. A moth was caught between the contacts and the operator carefully pulled it out with tweezers. It was taped in the logbook, as the first actual bug found. Hopper and her team may have coined the term computer bugs, meaning a failure.

Remington Rand and UNIVAC-I
In June 1949, Hopper joined Eckert-Mauchly Computer Corporation(EMCC). During the second world war, electronic computers were built only at universities and provided mathematical solutions for scientific projects. The use of a computer by business corporations was still in its nascent stage. Capital was hard to come by. EMCC had finished building the BINAC. EMCC was not doing well financially. Remington Rand acquired EMCC in 1950 and through another merger in 1955 became Sperry Rand.

EMCC had won the contract for building UNIVAC for the Census Bureau and development was underway. The UNIVAC was the first computer to have both commercial and scientific applications. Before UNIVAC, information was recorded on paper tapes in the form of punched-holes. With UNIVAC, information was stored on magnetic metal tapes and mounted on a UNISERVO, which converted it into electrical pulses to be fed to the computer at 12,000 digits/second. Since this speed was much faster than could be achieved manually, the tapes were prepared ahead of time on a UNITYPER. A UNITYPER has a regular type-writer keyboard, a numeric keyboard and a bunch of special keys. The UNIPRINTER was the output device, that essentially read the output magnetic tape and printed it.

A video of the UNIVAC - the Giant Electronic Brain(Source:

In 1952, elections were held in the United States. As the counting of votes began, input vote statistics were fed into the UNIVAC. With 7 per cent of the votes counted, the UNIVAC extra-polated the data and correctly predicted a land-slide victory for Dwight Eisenhower. Nobody believed it could be right, until the results were declared. The UNIVAC had become famous. Insurance company Metropolitan Life(Metlife) used a UNIVAC to print premium notices and processing payroll. Statefarm Mutual Automobile Insurance company used the UNIVAC in its business.

A-0, the world's first compiler
Many computations or calculations on the UNIVAC involved the same sub-routines. For example, two different problems may need the square-roots of a number. Yet each time, the programmer wrote pages and pages of duplicate code. Hopper had taken down the most commonly used subroutines in a notebook, during her tenure at Harvard. She made a tape with all the routines on it and assigned a three-letter call sign to each subset. The programmer would then just enter the call-sign and UNIVAC would get the code from the tape. What had previously taken a month of programming time, the computer could now accomplish this in minutes.

When you prepare for an examination, you'd visit the college library, read, gather infomation and refer different books, journals and then compile your notes. Similarly, the sub-routines in a library have got to be linked to main program before you can run it. Hopper and her team created a software A-0, known to us as compiler to link the sub-routines to the driver-module to make a complete finished program. A-0 was the world's first compiler.

Hopper and her team developed the subsequent versions A-1, A-2 and A-3 of the compiler. The A-2 compiler allowed the programmer to code the problem in a pseudo-language instead of machine language. This paved the way for modern-day programming languages.

FLOW-MATIC and Cobol
Hopper had envisioned that computer programs could be written in plain, simple, English-language. She began working on a pseudo-language FLOW-MATIC for business-oriented tasks such as automatic billing, payroll calculation. She recommended that FLOW-MATIC should use English words, so that various levels of management and people familiar with business processes could easily convert their ideas into running programs. FLOW-MATIC used English and it was intelligible to all.

There was a pressing need to have a common business language to write programs that ran on any computer. A meeting was convened on 28-29 May, 1959 and it had 7 representatives from the US DoD, 11 users and 15 computer manufacturers. This meeting led to the creation of the CODASYL(Conference on Data Systems Language) committee. Three different groups - short, intermediate and long-range were formed. Grace Hopper was one of the two technical advisers to the CODASYL executive committee. A six-person sub-comittee of the short-range group created the first COmmon Business Oriented Language(Cobol) specifications in October, 1959. Interestingly, you can still read the CODASYL committee report which includes the initial COBOL specifications here. Cobol drew inspiration from FLOW-MATIC, its fore-runner. Grace Hopper the inventor of FLOW-MATIC, is the mother of Cobol.

To many people who are thrown to work at a mainframe computer on their first job, they feel lost. Mainframe people seem to speak a completely different language and that doesn't make life easy. What's more, the books and manuals are incredibly hard to comprehend.

"What on earth is a Mainframe?" is an absolute beginner's guide to mainframe computers. We'll introduce you to the hardware and peripherals. We'll talk about the operating system, the software installed on a mainframe. We'll also talk about the different people who work on a mainframe. In a nutshell, we'll de-mystify the mainframe.

Readers based in India, can buy the e-book for Rs. 50 only or the print book. International readers based in the US and other countries can click here to purchase the e-book.