-
Notifications
You must be signed in to change notification settings - Fork 26
CobolProgramStructure
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
Introduction
TypeCobol language
-
In a nutshell
-
TypeCobol concepts
TypeCobol Editor
(Type)Cobol parser API
TypeCobol architecture
- Glossary
- Main phases
- How to extend the grammar and semantic check (full example)
- File
- Text
- Code analysis steps
- Program class parser
- Type checker
- Error handler
- Grammars Composition
- Code generation
- Compilation process
(Type)Cobol concepts / reference doc
Contributing