cobol IF with shortform conditionals


Example

IF A = 1 OR 2 THEN
    perform miracles
END-IF

IF A = 1 OR 2 AND B = 1 THEN
    perform rites-of-passage
ELSE
    perform song-and-dance
END-IF

IF statements can be terminated with full stop or explicit scope terminator END-IF. Use of periods for scope termination is no longer recommended. Full stops mean just that in the case of nested IF, all nesting is terminated at the first full stop ., and any subsequent code will be outside the IF block.