Conditions
- IF and EVALUATE. IF branches with ELSE and END-IF: conditions written close to English.
- EVALUATE. EVALUATE is COBOL’s switch: WHEN clauses matching values and conditions, TRUE tables included.
- Condition names. 88-level condition names make IF statements read as policy: the business rule visible.
PERFORM
- PERFORM basics. PERFORM runs a paragraph and returns: the call mechanism of structured COBOL.
- PERFORM UNTIL. PERFORM UNTIL loops a paragraph: the read-process loop every batch program contains.
- PERFORM VARYING. PERFORM VARYING counts through tables: the indexed loop, bounds explicit.
Business Processing Flow
- Structured shape. Healthy programs read top-down: a main paragraph performing initialisation, processing, termination.
- GO TO honestly. Legacy code carries GO TO: read it fluently, write it never, untangle it gradually.
- COMPUTE and arithmetic. COMPUTE evaluates expressions with ROUNDED and ON SIZE ERROR: arithmetic with declared honesty.
Before and after this level
- Before: Level 2: Data Definitions: PIC Clauses, Numeric and Character Data, Records and Fields.
- Next: Level 4: Tables & Records: Tables, OCCURS, Structured Business Records.
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 3: Program Logic cover?
Conditions, PERFORM, Business Processing Flow: 3 lessons and 9 ideas.
What should I know before this level?
The level before it, Level 2: Data Definitions, which covers PIC Clauses, Numeric and Character Data, Records and Fields.