The BACKSPACE statement repositions a sequential file currently open for sequential access to the beginning of the preceding record. When the next I/O statement for the unit is executed, the preceding record is available for processing. The BACKSPACE statement takes one of the following forms:
BACKSPACE ([UNIT=]u [,ERR=s] [,IOSTAT=ios]) BACKSPACE u
The unit number must refer to an open file on disk or magnetic tape. For example, the following statement repositions the open file on logical unit 4 to the beginning of the preceding record:
BACKSPACE 4
A BACKSPACE statement should not be specified for a file that is opened for direct, keyed, or append access. Backspacing from record n can only be done by rewinding to the start of the file and then performing n-1 successive READs to reach the previous record. For direct, keyed, and append access, the current record count (n) is not available to the RMS I/O system.