COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-45
DELETE
DELETE
DELETE removes a record from a relative or indexed file that is open in I-O mode.
file-name
is the name of a relative or indexed file that is open in I-O mode.
imperative-stmt-1
is an imperative statement to be executed when the invalid-key condition arises
during the delete operation. It is required for a file whose access mode is random
or dynamic (but prohibited for a file whose access mode is sequential) when there
is no USE procedure that applies to the file.
imperative-stmt-2
is an imperative statement to be executed (after a declarative procedure) when no
exception or an exception other than the invalid-key condition arises during the
delete operation.
END-DELETE
ends the scope of the DELETE statement and makes it a delimited-scope
statement. If you omit END-DELETE but include the INVALID KEY or NOT
INVALID KEY phrase, the DELETE statement is a conditional statement and ends
at the next period separator.
DELETE
file-name
RECORD
NOT
END-DELETE
INVALID
KEY
imperative-stmt-1
INVALID
KEY
imperative-stmt-2
VST143.vsd