(
COmmon
Business
Oriented
Language) A high-level programming language primarily used for business development on mainframes and minicomputers throughout the 1970s and 1980s. Officially adopted in 1960, COBOL was one of the first compiled languages in a world where assembly languages were the norm. See
assembly language.
COBOL stemmed from FLOW-MATIC, the first programming language developed in the mid-1950s for the UNIVAC I by Grace Hopper, later Rear Admiral Hopper (see
GH200). The Gartner Group estimated that at the turn of the century, more than 200 billion lines of COBOL code were in existence, and many COBOL programs are still running today. Changes to the code are difficult because COBOL programmers are few and far between. Nevertheless, the COBOL language has been updated periodically with new features, even as recently as 2023. See
FLOW-MATIC and
IBM COBOL.
COBOL is very wordy, but its verbosity makes it very readable. For example, the COBOL version of
grosspay = hours*rate is
multiply rate by hours giving grosspay (see
COBOL fingers). COBOL is structured into the following divisions:
Division Name Contains
IDENTIFICATION Program identification.
ENVIRONMENT Types of computers used.
DATA Buffers, constants, work areas.
PROCEDURE The processing (program logic).
The following COBOL example for an IBM 370 mainframe converts a Fahrenheit number to Celsius. This example performs the operation at the operator's terminal.
IDENTIFICATION DIVISION.
program-ID. example.
ENVIRONMENT DIVISION.
configuration section.
SOURCE-COMPUTER. IBM-370.
OBJECT-COMPUTER. IBM-370.
DATA DIVISION.
working-storage section.
77 FAHR picture 999.
77 CENT picture 999.
PROCEDURE DIVISION.
display 'Enter Fahrenheit ' upon console.
accept FAHR from console.
compute CENT = (FAHR- 32) * 5 / 9.
display 'Celsius is ' CENT upon console.
goback.