The DELETE Statement
Syntax
Format
DELETE file-name-1 RECORD
[INVALID KEY imperative-statement-1]
[NOT INVALID KEY imperative-statement-2]
[END-DELETE]
Description
The DELETE statement is used to delete records from indexed and relative files. (Records cannot be deleted from sequential files.) The system will delete the record associated with the record key for indexed files or the relative key for relative files. If such a record does not exist prior to the DELETE being executed, the INVALID KEY imperative statement, if any, will be executed. If the record actually did exist, the NOT INVALID KEY imperative statement, if any, will be executed.
Tips
1. Set the record key or relative key to the record to be set prior to the execution of the DELETE statement.
2. It isn't necessary to actually read the record prior to deleting it.
Posted by
KK
at
5:22 AM