Online Encyclopedia Search Tool

Your Online Encyclopedia

 

Online Encylopedia and Dictionary Research Site

Online Encyclopedia Free Search Online Encyclopedia Search    Online Encyclopedia Browse    welcome to our free dictionary for your research of every kind

Online Encyclopedia



COBOL

COBOL is a second-generation programming language. Its name is an acronym, for COmmon Business Oriented Language, defining its primary domain in business, finance, and administrative systems for companies and governments.

Contents

Prehistory and specification

COBOL was initially created in 1959 by The Short Range Committee , one of three committees proposed at a meeting held at the Pentagon in May 1959, organized by Charles Phillips of the United States Department of Defense. The Short Range Committee was formed to recommend a short range approach to a common business language. It was made up of members representing six computer manufacturers and three government agencies. In particular, the six computer manufacturers were Burroughs Corporation, IBM, Minneapolis-Honeywell (Honeywell Labs), RCA, Sperry Rand, and Sylvania Electric Products . The three government agencies were the US Air Force, the David Taylor Model Basin , and the National Bureau of Standards (Now NIST). This committee was chaired by a member of the NBS. An Intermediate-Range Committee and a Long-Range Committee were proposed at the Pentagon meeting as well. However although the Intermediate Range Committee was formed, it was never operational; and the Long-Range Committee was never even formed. In the end a sub-committee of the Short Range Committee developed the specifications of the COBOL language. This sub-committee was made up of six individuals:

This subcommittee completed the specifications for COBOL as the year of 1959 came to an end. The specifications were to a great extent inspired by the FLOW-MATIC language invented by Grace Hopper, and the IBM COMTRAN language invented by Bob Bemer.

The specifications were approved by the full Short Range Committee. From there, they were approved by the Executive Committee in January 1960, and sent to the government printing office, which edited and printed these specifications as Cobol 60 . COBOL was developed within a six month period, and yet is still in use over 40 years later.

Defining features

COBOL as defined in the original specification, possessed excellent self-documenting capabilities, good file handling methods, and exceptionally good data typing for the time, owing to its use of the PICTURE clause for detailed field specification. However by modern standards for programming language definition, it had serious flaws, notably verbose syntax and lack of support for local variables, recursion, dynamic memory allocation, and structured programming. Its lack of support for object-oriented programming is understandable, given that the concept was unknown at the time

COBOL has many reserved words, and it is hard to avoid unintentionally using one, without using some convention such as adding an unlikely prefix to all variable names. The original COBOL specification even supported self-modifying code via the famous "ALTER X TO PROCEED TO Y" statement. Consequently, little new code is being written in COBOL. However, the COBOL specification has been redefined over the years to address some of these criticisms. and later definitions of COBOL have remedied many of these lacks, adding improved control structures, object-orientation and removing the ability to use self-modifying code.

Still going strong

Many COBOL programs are still in use in major commercial enterprises, notably financial institutions. Some people think that the use of serial decimal arithmetic in its design happened to make programs designed without provision for the advent of the 2000s particularly vulnerable to failure with the year 2000 problem; however, it is difficult to see why they should have formed this opinion. It should be pointed out that COBOL's serial decimal arithmetic avoided many other problems that can occur with the naïve use of floating point for financial calculations. Hence, many elderly COBOL programmers enjoyed several years of highly-paid work, often to fix the problems in systems they designed decades before.

Hello world

 000100 IDENTIFICATION DIVISION.
 000200 PROGRAM-ID.     HELLOWORLD.
 000300 DATE-WRITTEN.   02/05/96        21:04.
 000400*       AUTHOR    BRIAN COLLINS
 000500 ENVIRONMENT DIVISION.
 000600 CONFIGURATION SECTION.
 000700 SOURCE-COMPUTER. RM-COBOL.
 000800 OBJECT-COMPUTER. RM-COBOL.
 000900
 001000 DATA DIVISION.
 001100 FILE SECTION.
 001200
 100000 PROCEDURE DIVISION.
 100100
 100200 MAIN-LOGIC SECTION.
 100300 BEGIN.
 100400     DISPLAY " " LINE 1 POSITION 1 ERASE EOS.
 100500     DISPLAY "HELLO, WORLD." LINE 15 POSITION 10.
 100600     STOP RUN.
 100700 MAIN-LOGIC-EXIT.
 100800     EXIT.

Criticism

A motivation of COBOL's design was to make programming easier by making the language as English-like as possible. While this idea seems reasonable on its face, in practice the most difficult task in programming is reducing a complex computation to a sequence of simple steps, not specifying those steps with a particular language. Critics therefore argue that COBOL's verbose syntax serves mainly to increase the size of programs, and that it impairs the development of the precise thinking needed for software development. Computer scientist Edsger Dijkstra remarked, "The use of COBOL cripples the mind; its teaching should, therefore, be regarded as a criminal offence." The SQL language, which follows COBOL's philosophy but is not used to write procedural code, has not faced as much criticism about its syntax.

Some programmers joke that the object-oriented extension of COBOL should be called ADD 1 TO COBOL GIVING COBOL. This is by analogy with C++, a pun on C's syntax for incrementing a variable in place, and it highlights the verbosity of COBOL's syntax compared to C.

See also

Other second-generation programming languages:

References

  • Sammet, J.E. (1981). "The Early History of Cobol." In History of Programming Languages, by Wexelblat, R.L., ed. New York: ACM Monograph Series.

External links




Last updated: 12-20-2004 09:31:34