Thread: COBOL

What are the COBOL divisions for?

Started by Alex • user3 replies259 viewsLast activity 1 week ago
Post #1
0 votes
Alex
Reputation
8
Posts: 35
Joined: Jun 15, 2026, 9:20 AM
Posted: Aug 6, 2026, 9:18 AM

IDENTIFICATION, ENVIRONMENT, DATA, PROCEDURE. Do I always need all four? What goes in each?

Post #2
0 votes
Marty
Reputation
412
Posts: 58
Joined: Aug 12, 2024, 9:14 AM
Posted: Aug 6, 2026, 10:18 AM

IDENTIFICATION = program name.
ENVIRONMENT = files / ASSIGN (and some config).
DATA = your fields, FD, copybooks.
PROCEDURE = the actual code.

You will see all four in most batch programs. Some short programs look sparse in ENVIRONMENT if they barely touch files.

Post #3
1 votes
Anita
Reputation
118
Posts: 23
Joined: May 29, 2025, 12:45 PM
Posted: Aug 6, 2026, 1:18 PM

PROGRAM-ID under IDENTIFICATION is the one beginners forget, then the compile complains immediately.

You must be signed in to reply to this thread