What is COBOL(Common Business Oriented Language)? (original) (raw)

Last Updated : 28 Apr, 2025

COBOL an acronym for Common Business Oriented Language is a computer programming language, which was designed for business use. COBOL was procedural in the beginning, but since 2002, COBOL became object-oriented. COBOL was developed by Conference of Data System Languages(CODASYL).

What-is-COBOL

COBOL is primarily used in business, finance, and administrative systems for companies and governments. COBOL is still widely used in applications that are based on mainframe computers like transaction processing jobs. But nowadays, due to the retirement of experienced COBOL programmers, new programmers are shifting to different platforms, which are written in modern languages.

History

In the late 1950s, computer manufactures were concerned about the huge cost of programming. In 1959, a survey had found that the cost of programming is around US $8, 00, 000 for any data processing installation, and when it comes to translating a program to run on a new machine, it would cost around 6 million dollars. When new programming languages were increasing at a huge rate, the survey also suggested that if a common business-oriented language were used, then the translation would be faster and cheaper. So, on 8 April 1959, Mary K. Hawes, a computer scientist at Burroughs Corporation, called a meeting of computer users, and manufacturers at the University of Pennsylvania to organize a formal meeting on common business languages.
Thereafter, the updates of COBOL are as follows:

Syntax of COBOL

COBOL has an English-like syntax, which is used to describe almost everything in the program.
For example, a condition expression can be represented as:

x IS GREATER THAN y

.
To have such English-like syntax, COBOL has over 300 reserved keywords. Some keywords are simple, and some are plural of a keyword; e.g. VALUE and VALUES.
Code Format:

Variable Declaration:

Types of Divisions

There are four types of divisions in COBOL :

Applications

COBOL is a language that is used in business and administrative systems for companies and governments. Though this language is more than 50 years old, yet COBOL is an important part of our tech-driven world. It still accounts for more than 70% of the business transactions that take place in the world. COBOL is used in applications that are deployed on mainframe computers.
COBOL is mainly used in large scale Batch and On-line transaction processing (OLTP) jobs.In Batch, there are larger programs that tend to handle a large number of records. This is the read-modify-write loop which is used in many COBOL programs. In OLTP the programs are executed parallelly by the Transaction Processing monitors within which they are developed and executed. There is a chance of performance improvement for such applications.

Structure of COBOL Language -

COBOL is much more rigidly structured than most other programming language. COBOL programs are hierarchical in structure. Each element of the hierarchy consists of one or more subordinate elements. The program hierarchy consists of divisions, sections, paragraphs, sentences, and statements.

Hierarchical COBOL program structure ;-

Cobol `

PROGRAM DIVISION (s) SECTION (s) Paragraph(s) Sentence(s) Statement(s)

`

A COBOL program is divided into distinct parts called "divisions". A division may contain one or more "sections". A section may contain one or more "paragraph". A paragraph may contain one or more "sentences", and a sentence may contain one or more "statements".

How to work with COBOL

To work with COBOL, you have many options. Firstly download any IDE such as Sublime text 3 or Eclipse. Then install the COBOL plugin. For reference you can go to this link.
Example:

html `

IDENTIFICATION DIVISION. PROGRAM-ID. HELLO-WORLD. PROCEDURE DIVISION. DISPLAY 'Hello world!' STOP RUN.

`

Output:

Hello World!

Advantages

Disadvantages