The BACKSPACE statement positions an external file
connected for sequential access
or formatted stream
access.
After the execution of a BACKSPACE statement, the file position is before the current record if a current record exists. If there is no current record, the file position is before the preceding record. If the file is at its initial point, file position remains unchanged.
You cannot backspace over records that were written using list-directed or namelist formatting.
For sequential access, if the preceding record is the endfile record, the file is positioned before the endfile record.
If the ERR= and IOSTAT= specifiers are set and an error is encountered, transfer is made to the statement specified by the ERR= specifier and a positive integer value is assigned to ios.
If IOSTAT= and ERR= are not specified,
BACKSPACE 15 BACKSPACE (UNIT=15,ERR=99) ... 99 PRINT *, "Unable to backspace file." END