Open In App

Program Structure of COBOL

COBOL is a programming language that was developed to solve business problems. COBOL stands for Common Business Oriented Language. Being a High-Level Structured Language, COBOL is very similar to English-like language, which is used to develop major business applications. Due to its easier maintenance, ability to work with any database (DB2, VSAM), and ability to handle huge volumes of data, COBOL is used for handling a wide range of traditional business scenarios like retail sales tracking, inventory control, contact management, commissions, and payroll systems.

COBOL programs are made up of similar constructs such as paragraphs, sentences, statements, and clauses. The hierarchy of a COBOL program is shown in the following diagram. The Division is a block of code, usually containing one or more sections. It starts where the division name is encountered and ends with the beginning of the next division or with the end of the program text.



 COBOL Program Divisions:

 

Example:




IDENTIFICATION DIVISION.   *>Line 1
 PROGRAM-ID. GFG.          *>Line 2
 ENVIRONMENT DIVISION.     *>Line 3
 DATA DIVISION.            *>Line 4
 PROCEDURE DIVISION.       *>Line 5
 PROGRAM-BEGIN.            *>Line 6         
 DISPLAY "GEEKS FOR GEEKS".*>Line 7
 PROGRAM-DONE.             *>Line 8
 STOP RUN.                 *>Line 9

Output:



 

 

Explanation:

Article Tags :