COBOL STRUCTURE

The entire COBOL program is divided into four segments i.e. DIVISIONs. Each DIVISION has its specific purpose to declare for the reader and the compiler. The following table shows the DIVISIONs with their names called Division Headers.

The DIVISIONs are furthes splitted into SECTIONs and Paragraphs. If you watch the following table, the 2nd column represents the SECTION names and 3rd shows the related Paragraphs.

IDENTIFICATION DIVISION.Program-id.
ENVIRONMENT DIVISION.CONFIGURATION SECTION.SOURCE-COMPUTER.
OBJECT-COMPUTER.
SPECIAL_NAMES>
DATA DIVISION.FILE SECTION.FD enteries
PROCEDURE DIVISIONprocedure names/section namescobol insructions/verbs/statements

NOTE: Only IDENTIFICATION DIVISION has not the SECTION header.

SAMPLE of a simple COBOL program:

IDENTIFICATION DIVISION.
PROGRAM-ID. SAMPLE.
ENVIRONMENT DIVISION.
CONFIGURATION SECTION.
SOURCE-COMPUTER. IBM/a.
OBJECT-COMPUTER. IBM/a
DATA DIVISION.
PROCEDURE DIVISION.
STARTING-UP.
STOP RUN.

NOTE: The result of above program is nothing but it is a complete COBOL program.

THE BASIC STRUCTURE OF COBOL


A cobol program is divided into four major Divisions in exactly the following sequence.

IDENTIFICATION DIVISION.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.

NOTE: