Identification and Environment Divisions
- The four divisions. Every program has four divisions: identification, environment, data and procedure: in fixed order.
- Identification. The IDENTIFICATION division names the program: PROGRAM-ID the handle other programs call.
- Environment. The ENVIRONMENT division maps files to the outside world: SELECT statements naming assignments.
Data Division
- Data declared first. The DATA division declares every variable before any logic: the program’s memory as a document.
- WORKING-STORAGE. WORKING-STORAGE holds the program’s own variables: counters, flags, accumulators.
- Level numbers. Level numbers nest records: 01 the record, 05 its fields: hierarchy by numbering.
Procedure Division
- Procedure division. The PROCEDURE division holds the logic: paragraphs and sections performed in order.
- Verbs. COBOL statements start with verbs: MOVE, COMPUTE, PERFORM, READ: actions in English.
- Paragraphs. A paragraph is a named block: the unit PERFORM calls, the program’s functions.
Before and after this level
- Before: Start Here: Software That Has Run for Decades: COBOL and Mainframes, Business Data Processing.
- Next: Level 2: Data Definitions: PIC Clauses, Numeric and Character Data, Records and Fields.
In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.
Frequently asked questions
What does COBOL Level 1: COBOL Program Structure cover?
Identification and Environment Divisions, Data Division, Procedure Division: 3 lessons and 9 ideas.
What should I know before this level?
The level before it, Start Here: Software That Has Run for Decades, which covers COBOL and Mainframes, Business Data Processing.