NEXT SENTENCE
General Format
Syntax Rules
1. A NEXT SENTENCE statement is allowed anywhere if either
-ca or
-cm compiler flags are used. Without these flags, a NEXT SENTENCE statement is allowed only anywhere a conditional statement is allowed.
General Rules
1. A NEXT SENTENCE statement transfers the flow of execution to the logically next COBOL verb following the next period.
Examples
Continue execution after the if statement
if 1 = 1 next sentence else display "this cannot ever be displayed" end-if. *> The period here is mandatory for the next *> sentence to know where to continue display "hello". |