Displaying Source Code(s)
Introduction to COBOL.
Description : A very simple introduction to COBOL.
COBOL is a high-level programming language first developed by
CODASYL Committee (Conference on Data Systems Languages) in
then, responsibility for developing new COBOL standards has been
by the American National Standards Institute (ANSI).
Three ANSI standards for COBOL have been produced: in 1968, 1974
A new COBOL standard introducing object-oriented programming to
due within the next few years.
The word COBOL is an acronym that stands for COmmon Business
Language. As the the expanded acronym indicates, COBOL is
developing business, typically file-oriented, applications. It
designed for writing systems programs. For instance you would
an operating system or a compiler using COBOL.
For over four decades COBOL has been the dominant programming
the business computing domain. In that time it it has seen off
challenges of a number of other languages such as PL1, Algol68,
Modula, Ada, C, C++. All these languages have found a niche but
yet displaced COBOL. Two recent challengers though, Java and
are proving to be serious contenders.
COBOL's dominance in underlined by the reports from the Gartner
In 1997 they estimated that there were about 300 billion lines
code in use in the world. Of that they estimated that about 80%
billion lines) were in COBOL and 20% (60 billion lines) were
all the other computer languages combined [Brown].
In 1999 they reported that over 50% of all new mission-critical
applications were still being done in COBOL and their recent
indicate that through 2004-2005 15% of all new applications (5
lines) will be developed in COBOL while 80% of all deployed
will include extensions to existing legacy (usually COBOL)
Gartner estimates for 2002 are that there are about two million
programmers world-wide compared to about about one million Java
programmers and one million C++ programmers.
COBOL is self-documenting
One of the design goals for COBOL was to make it possible for
non-programmers such as supervisors, managers and users, to read
understand COBOL code. As a result, COBOL contains such
structural elements as verbs, clauses, sentences, sections and
As it happens, this design goal was not realized. Managers and
nowadays do not read COBOL programs. Computer programs are just
complex for most laymen to understand them, however familiar the
elements. But the design goal and its effect on COBOL syntax has
important side-effect. It has made COBOL the most readable,
and self-documenting programming language in use today. It has
it the most verbose.
It is easy for programmers unused to the business programming
where programming with a view to ease of maintenance is very
dismiss the advantage that COBOL's readability imparts. Not only
readability generally assist the maintenance process but the
program gets the more valuable this readability becomes.
When programs are new, both the in-program comments and the
documentation accurately reflect the program code. But over
time, as more
and more revisions are applied to the code, it gets out of step
documentation until the documentation is actually a hindrance to
maintenance rather than a help. The self-documenting nature of
that this problem is not as severe with COBOL programs as it is
Readers who are familiar with C or C++ or Java might want to
difficult it becomes to maintain programs written in these
programs that you have written yourself are difficult enough to
when you come back to them six months later. Consider how much
difficult it would be to understand a program that had been
fifteen years previously, by someone else, and which had since
amended and added to by so many others that the documentation no
accurately reflects the program code. This is a nightmare still
maintenance programmers of the future
COBOL is simple
COBOL is a simple language (no pointers, no user defined
user defined types) with a limited scope of function. It
simple straightforward programming style. Curiously enough
its limitations, COBOL has proven itself to be well suited to
problem domain (business computing). Most COBOL programs operate
domain where the program complexity lies in the business rules
to be encoded rather than in the sophistication of the data
algorithms required. And in cases where sophisticated algorithms
required COBOL usually meets the need with an appropriate verb
such as the
SORT and the SEARCH.