DELETE (FILELIST)
The DELETE instruction removes records from a file. Additionally, the keys of all ISAM files within the FILELIST are removed. The statement format is as follows:
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
filelist
Required. A previously defined and opened FILELIST variable from which the data and keys are removed.
Flags Affected: OVER
Note the following:
The instruction requires that the last READ operation on any one of the files specified in the FILELIST must have been a valid.
A READ instruction for a file not included in the FILELIST does not affect the READ status for the FILELIST.
The DELETE instruction removes the keys of each ISAM or AAM file within the FILELIST for the record data being deleted.
The DELETE instruction operation synchronizes the primary file to the last valid FILELIST file READ and deletes the text data record.
Should an error occur for any part of the operation, the runtime attempts to restore the old record and associated keys to their original state prior to the operation.
See Also: Example Code, WRITE (FILELIST), Disk I/O Instructions
![]() |