An imperative statement either specifies an unconditional action to be taken by the program, or is a conditional statement terminated by its explicit scope terminator (see "Delimited Scope Statements" in topic 6.1.7.3). A series of imperative statements can be specified whenever an imperative statement is allowed. A conditional statement that is terminated by its explicit scope terminator is also classified as an imperative statement (see "Delimited Scope Statements" in topic 6.1.7.3). Table 32 lists COBOL imperative statements.
Table 32. Imperative Statements |
---|
Arithmetic ADD(1) COMPUTE(1) DIVIDE(1) MULTIPLY(1) SUBTRACT(1) |
Data Movement ACCEPT (DATE,DAY,DAY-OF-WEEK,TIME) INITIALIZE INSPECT MOVE SET STRING(2) UNSTRING(2) |
Ending STOP RUN EXIT PROGRAM X EXIT METHOD X GOBACK |
Input-Output ACCEPT identifier CLOSE DELETE(3) DISPLAY OPEN READ(4) REWRITE(3) START(3) STOP literal WRITE(5) |
Ordering MERGE RELEASE RETURN(6) SORT |
Procedure Branching ALTER EXIT GO TO PERFORM |
Program or Method Linkage CALL(7) CANCEL X INVOKE |
Table Handling SET |
Note: (1) Without the ON SIZE ERROR and/or the NOT ON SIZE ERROR phrase. (2) Without the ON OVERFLOW and/or the NOT ON OVERFLOW phrase. (3) Without the INVALID KEY and/or the NOT INVALID KEY phrase. (4) Without the AT END, NOT AT END, INVALID KEY, and/or NOT INVALID KEY phrases. (5) Without the INVALID KEY, NOT INVALID KEY, END-OF-PAGE, and/or NOT END-OF-PAGE phrases. (6) Without the AT END and/or NOT AT END phrase. (7) Without the ON OVERFLOW phrase, and without the ON EXCEPTION and/or NOT ON EXCEPTION phrase. |
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.