Top: f77 Up: 13 - Statements
Previous: 13,15 - DATA Next: 13,17 - DIMENSION
Section 13,16: DELETE
Deletes a record from a relative file. Statement format:
Format -- Relative:
DELETE ([UNIT=]u [,REC=r] [,ERR=s] [,IOSTAT=ios])
DELETE (u'r [,ERR=s] [,IOSTAT=ios])
Deletes the specified record from a relative file.
u Is the logical unit specifier, optionally prefaced
by UNIT=. UNIT= is required if unit is not the first
I/O specifier.
r Is a record position specifier, prefaced by REC=.
u'r Is a unit and a record position specifier, not
prefaced by REC=.
s Is the label of a statement to which control is
transferred if an error occurs, prefaced by ERR=.
ios Is an I/O status specifier, prefaced by IOSTAT=.
The forms of the DELETE statement with relative files are direct
access deletes. These forms delete the record specified by the
number "r". If REC=r is omitted, the current record is deleted.
The DELETE statement logically removes the appropriate record from
the specified file by locating the record and marking it as a
deleted record. A new record can be written into that position.
Following a direct access delete, any associated variable is set to
the next record number.
NOTE: You must specify the -vms compiler option for future READs
to detect that a record has been deleted.
Top: f77 Up: 13 - Statements
Previous: 13,15 - DATA Next: 13,17 - DIMENSION