MODULE 7: COBOL Control statements
COBOL Control statements
- COBOL programming language uses control statements to cause the flow of execution to advance and branch based on changes to the state of a program
- COBOL’s program control statements can be put into the following categories:- Selection, Iteration and Jump
- Selection statement allows your program to choose different paths of execution based on the output of conditional expression or the status of variable. COBOL supports two selection statement: Conditional expression can take one of the following form:-
- Iteration statement allows program execution to repeat one or more statements (i.e. iteration statements form loops). COBOL supports one iteration statement:
- Jump statement allows your program to execute in a non-linear fashion. COBOL supports few jump statements such as:
- We will be discussing all of them in detail in upcoming section