The @ELIM statement deletes an ISAM file either fully or partially. If the entire content is deleted then - unlike @UNSAVE – the file name remains present in the catalog. It is also possible to delete the file in the work file and on disk simultaneously.
Operation | Operands | F mode, L mode |
@ELIM | [file] [(ver)] lines[,...] [BOTH] |
file | Name of the ISAM file in which ranges are to be deleted. The name must If the If the specified file does not exist, is of the wrong type or cannot be If the file link name |
ver | Version number of the file that is to be deleted. If the specified version |
lines | One or more line ranges that are to be deleted from the ISAM file. If If the range symbol (default value |
BOTH | The designated line range is to be deleted both in the ISAM file and in the |
The file is only opened temporarily during the delete operation. @ELIM can only be used to delete records in files that do not have the default attributes assumed by EDT (e.g. no variable record length) if a corresponding /SET-FILE-LINK
command has been issued with the file link name EDTISAM
(see chapter “File processing”).
If the statement is interrupted with [K2] and the EDT session is continued with /INFORM-PROGRAM
then the processing of the statement is aborted and message EDT5501
is output.
Example
23.00 ········································································
@get 'xmpl.elim' noreseq ······································0001.00:00001(00)
The ISAM file XMPL.ELIM
is read into work file 0. The ISAM keys are to be taken over as the line numbers.
The line range 5-7 is deleted both in work file 0 and in the ISAM file XMPL.ELIM
.
If the ISAM file is read using @GET without NORESEQ
then the ranges to be deleted in the ISAM file and the work file do not have to correspond.
Work file 0 is deleted and then the ISAM file XMPL.ELIM
is read in again.
The line range 5 to 7 is also deleted in the ISAM file.