Skip to content
COBOL

COBOL divisions

The four fixed sections every COBOL program is built from, always in the same order.

Also written divisions, identification division, environment division

A COBOL program is organised into four divisions, and they always appear in the same sequence. That rigidity is one of the things that makes unfamiliar COBOL navigable, because you always know roughly where you are.

IDENTIFICATION DIVISION comes first and names the program. It is short, often just a program name and some comments about what it does and who changed it last.

ENVIRONMENT DIVISION describes the connection to the outside world, chiefly which files the program uses and what internal names it gives them. Those names are what the JCL then supplies real datasets for.

DATA DIVISION declares everything the program works with: the layout of each record it reads or writes, and the variables it uses while running. In a typical business program this is a large section, because business records have a lot of fields.

PROCEDURE DIVISION holds the actual logic, the statements that run.

Divisions contain sections, sections contain paragraphs, and paragraphs contain sentences. That hierarchy is consistent throughout.

Browse all 115 terms

Learn this properly.

Use COBOL divisions for real in Mainframe101, in your browser, with Zed beside you. Join the waitlist.

Early access and updates. No spam, unsubscribe any time.