COBOL Manual for TNS and TNS/R Programs

Procedure Division
HP COBOL Manual for TNS and TNS/R Programs522555-006
8-5
Statements
Topics:
Imperative Statement
Conditional Statement
Delimited-Scope Statement
Scope of Statements
Imperative Statement
An imperative statement specifies an unconditional action for the process to take. Each
imperative statement begins with an imperative verb.
An individual delimited-scope statement or a sequence of two or more imperative
statements is considered to be an imperative statement under the rules for statement
formation; therefore, when imperative-statement appears in a statement, it
refers to one or more consecutive imperative statements and/or delimited-scope
statements.
Table 8-3. Imperative Verbs
ACCEPT DISPLAY MULTIPLY
1
STOP
ADD
1
DIVIDE
1
OPEN STRING
3
ALTER ENTER
7
PERFORM SUBTRACT
1
CALL
3
EXIT
8
READ
4
UNLOCKFILE
6
CANCEL GO TO RELEASE UNLOCKRECORD
6
CHECKPOINT
6,9
INITIALIZE REWRITE
2
UNSTRING
3
CLOSE INSPECT SET WRITE
5
COMPUTE
1
LOCKFILE
6
SORT
CONTINUE MERGE START
2
DELETE
2
MOVE STARTBACKUP
6,9
1. Without SIZE ERROR or NOT SIZE ERROR phrase or else with a scope terminator
2. Without INVALID KEY or NOT INVALID KEY phrase or else with a scope terminator
3. Without OVERFLOW, EXCEPTION, or NOT EXCEPTION phrase or else with a scope terminator
4. Without AT END, NOT AT END, INVALID KEY, or NOT INVALID KEY phrase or else with a scope terminator
5. Without INVALID KEY, NOT INVALID KEY, END-OF-PAGE, or NOT END-OF-PAGE phrase or else with a
scope terminator
6. HP extension
7. In HP COBOL, analogous to CALL but used only to call non-COBOL routines
8. Limited to appearing alone in a paragraph conditional statement. This is because it can include phrases that
are or are not executed depending upon the value of a a condition (for example, the delimited-scope IF
statement) or upon the occurrence of an exception (for example, the delimited-scope READ statement).
9. Before RVU D46.00 and G06.00, software product revision T8107AAT (run-time library T8108AAR), the
NMCOBOL compiler ignores this directive and issues a warning.