A conditional statement specifies that the truth value of a condition is to be determined, and that the subsequent action of the object program is dependent on this truth value. (See "Conditional Expressions" in topic 6.1.6.) Table 33 lists COBOL statements that become conditional when a condition (for example, ON SIZE ERROR or ON OVERFLOW) is included, and when the statement is not terminated by its explicit scope terminator.
Table 33. Conditional Statements |
---|
Arithmetic ADD...ON SIZE ERROR ADD...NOT ON SIZE ERROR COMPUTE...ON SIZE ERROR COMPUTE...NOT ON SIZE ERROR DIVIDE...ON SIZE ERROR DIVIDE...NOT ON SIZE ERROR MULTIPLY...ON SIZE ERROR MULTIPLY...NOT ON SIZE ERROR SUBTRACT...ON SIZE ERROR SUBTRACT...NOT ON SIZE ERROR |
Data Movement STRING...ON OVERFLOW STRING...NOT ON OVERFLOW UNSTRING...ON OVERFLOW UNSTRING...NOT ON OVERFLOW |
Decision IF EVALUATE |
Input-Output DELETE...INVALID KEY DELETE...NOT INVALID KEY READ...AT END READ...NOT AT END READ...INVALID KEY READ...NOT INVALID KEY REWRITE...INVALID KEY REWRITE...NOT INVALID KEY START...INVALID KEY START...NOT INVALID KEY WRITE...AT END-OF-PAGE WRITE...NOT AT END-OF-PAGE WRITE...INVALID KEY WRITE...NOT INVALID KEY |
Ordering RETURN...AT END RETURN...NOT AT END |
Program or Method Linkage CALL...ON OVERFLOW CALL...ON EXCEPTION CALL...NOT ON EXCEPTION X INVOKE...ON EXCEPTION X INVOKE...NOT ON EXCEPTION |
Table Handling SEARCH |
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.