COBOL [Common Business oriented Language]
COBOL stands for Common Business-Oriented Language. The US Department ofDefense, in a conference, formed CODASYL (Conference on Data Systems
Language) to develop a language for business data processing needs which is
now known as COBOL.
COBOL is used for writing application programs and we cannot use it to write
system software. The applications like those in defense domain, insurance
domain, etc. which require huge data processing make extensive use of COBOL.
Prerequisites
Before proceeding with this tutorial, you should have a basic understanding of
computer programming terminologies and JCL. A basic understanding of any of
the programming languages will help you understand the concepts of COBOL
programming and move fast on the learning track.
Introduction to COBOL
COBOL is a high-level language. One must understand the way COBOL works.
Computers only understand machine code, a binary stream of 0s and 1s. COBOL
code must be converted into machine code using a compiler. Run the program
source through a compiler. The compiler first checks for any syntax errors and
then converts it into machine language. The compiler creates an output file
which is known as load module. This output file contains executable code in the
form of 0s and 1s.
Evolution of COBOL
During 1950s, when the businesses were growing in the western part of the
world, there was a need to automate various processes for ease of operation and
this gave birth to a high-level programming language meant for business data
processing.
In 1959, COBOL was developed by CODASYL (Conference on Data
Systems Language).
The next version, COBOL-61, was released in 1961 with some revisions.
In 1968, COBOL was approved by ANSI as a standard language for
commercial use (COBOL-68).
It was again revised in 1974 and 1985 to develop subsequent versions
named COBOL-74 and COBOL-85 respectively.
In 2002, Object-Oriented COBOL was released, which could use
encapsulated objects as a normal part of COBOL programming.
Importance of COBOL
COBOL was the first widely used high-level programming language. It is
an English-like language which is user friendly. All the instructions can be
coded in simple English words.
COBOL is also used as a self-documenting language.
COBOL can handle huge data processing.
COBOL is compatible with its previous versions.
COBOL has effective error messages and so, resolution of bugs is easier.
1. OVERVIEFeatures of COBOL
Standard Language
COBOL is a standard language that can be compiled and executed on machines
such as IBM AS/400, personal computers, etc.
Business Oriented
COBOL was designed for business-oriented applications related to financial
domain, defense domain, etc. It can handle huge volumes of data because of its
advanced file handling capabilities.
Robust Language
COBOL is a robust language as its numerous debugging and testing tools are
available for almost all computer platforms.
Structured Language
Logical control structures are available in COBOL which makes it easier to read
and modify. COBOL has different divisions, so it is easy to debug.
Installing COBOL on Windows/Linux
There are many Free Mainframe Emulators available for Windows which can be
used to write and learn simple COBOL programs.
One such emulator is Hercules, which can be easily installed on Windows by
following a few simple steps as given below:
Download and install the Hercules emulator, which is available from the
Hercules' home site : www.hercules-390.eu
Once you have installed the package on Windows machine, it will create a
folder like C:/hercules/mvs/cobol.
Run the Command Prompt (CMD) and reach the directory
C:/hercules/mvs/cobol on CMD.
The complete guide on various commands to write and execute a JCL and
COBOL programs can be found at:
www.jaymoseley.com/hercules/installmvs/instmvs2.htm
Hercules is an open-source software implementation of the mainframe
System/370 and ESA/390 architectures, in addition to the latest 64-bit
z/Architecture. Hercules runs under Linux, Windows, Solaris, FreeBSD, and Mac