An imperative statement indicates a specific unconditional action to be taken . An imperative statement is any statement that is neither a conditional statement nor a COBOL system-directing statement. An imperative statement can consist of a sequence of imperative statements, each possibly separated from the next by a separator.
The imperative verbs are:
1 | Without the optional ON EXCEPTION phrase. |
2 | Without the optional SIZE ERROR phrase. |
3 | Without the optional INVALID KEY phrase. |
4 | Without the optional ON OVERFLOW or ON EXCEPTION phrase. |
5 | Without the optional AT END phrase or INVALID KEY phrase. |
6 | Without the optional INVALID KEY phrase or END-OF-PAGE phrase. |
The additional ANSI'85 imperative verbs are:
The additional ISO 2002 imperative verb is:
The additional OS/VS COBOL imperative verbs are:
|
|
|
The additional VS COBOL II imperative verb is:
The additional imperative verbs available to this COBOL system are:
When "imperative-statement" appears in the general format of statements, "imperative-statement" refers to that sequence of consecutive imperative statements that must be ended by a period or by any phrase associated with a statement containing that "imperative-statement".
Either the connective word "THEN" or the connective word "AND" can optionally be placed between any two imperative statements which appear in a single sequence of imperative statements.