Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

@ELIM - Delete records in an ISAM file

&pagelevel(3)&pagelevel

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
correspond to the SDF data type <filename 1..54> or must consist of the
special specification '/'.

If the file operand is not specified then the explicit local @FILE entry, if
present, and otherwise the global @FILE entry is used as the file name (see
also @FILE statement). If there is neither an explicit local nor a global
@FILE entry then the @ELIM statement is rejected with the error message
EDT5484.

If the specified file does not exist, is of the wrong type or cannot be
accessed, then the @ELIM statement is rejected with a corresponding
message.

If the file link name EDTISAM is assigned to a file then the user simply needs
to specify '/' in order to delete records in the file (see chapter “Fileprocessing”).

ver

Version number of the file that is to be deleted. If the specified version
number does not match the file's version number, the statement is rejected
with message EDT4985.

lines

One or more line ranges that are to be deleted from the ISAM file. If
symbolic line numbers are specified then their values are determined from
the current work file and therefore usually have nothing to do with the record
structure of the file specified in file.

If the range symbol (default value &) is specified for lines and the default
value is still set to 0.0001-9999.9999 (see @RANGE statement) then the
entire content of the file is deleted. However, the catalog entry is retained.

BOTH

The designated line range is to be deleted both in the ISAM file and in the
work file.

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.