CobolProgramStructure - TypeCobolTeam/TypeCobol GitHub Wiki
Sections and paragraphs define a program. Sections and paragraphs are subdivided into sentences, statements, and entries. Sentences are subdivided into statements, and statements are subdivided into phrases. Entries are subdivided into clauses.
An entry is a series of clauses that ends with a separator period. Entries are constructed in the identification, environment, and data divisions.
A clause is an ordered set of consecutive COBOL character-strings that specifies an attribute of an entry. Clauses are constructed in the identification, environment, and data divisions.
A sentence is a sequence of one or more statements that ends with a separator period. Sentences are constructed in the PROCEDURE DIVISION.
A statement specifies an action to be taken by the program. Statements are constructed in the PROCEDURE DIVISION.
Each clause or statement in a program can be subdivided into smaller units called phrases.
The syntactical hierarchy follows this form:
- IDENTIFICATION DIVISION
- Paragraphs
- Entries
- Clauses
- Entries
- Paragraphs
- ENVIRONMENT DIVISION
- Sections
- Paragraphs
- Entries
- Clauses
- Phrases
- Clauses
- Entries
- Paragraphs
- Sections
- DATA DIVISION
- Sections
- Entries
- Clauses
- Phrases
- Clauses
- Entries
- Sections
- PROCEDURE DIVISION
- Sections
- Paragraphs
- Sentences
- Statements
- Phrases
- Statements
- Sentences
- Paragraphs
- Sections
excerpts from Enterprise COBOL for z/OS, V5.1.1 Language Reference