HELPLIB.HLB  —  FORTRAN  Statements  DELETE
  Deletes a record from an indexed or a relative file.  Statement
  format:

  Format -- Indexed:

     DELETE ([UNIT=]io-unit [,ERR=label] [,IOSTAT=i-var])

     Deletes the current record (last record  read)  from  an  indexed
     file.

  Format -- Relative:

     DELETE ([UNIT=]io-unit [,REC=r] [,ERR=label] [,IOSTAT=i-var])
     DELETE (io-unit'r [,ERR=label] [,IOSTAT=i-var])

     Deletes the specified record from a relative file.

     io-unit   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=.

     io-unit'r Is a unit and a record position specifier, not
               prefaced by REC=.

     label     Is the label of a statement to which control is
               transferred if an error occurs, prefaced by ERR=.

     i-var     Is an I/O status specifier, prefaced by IOSTAT=.
               (Returns a zero if no error condition exists or
               a positive integer if an error condition exists.)

  The forms of the DELETE statement with relative files are direct
  access deletes.  These forms delete the record specified by the
  number "r".

  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.

  If REC=r is omitted, the current record is deleted.  When the
  direct access record is deleted, any associated variable is set to
  the next record number.
Close Help