
Input/Output |
6.2.2.2 File Disposition Specifier
The format of the file disposition specifier is
STATUS = stat
where 'stat' is a character expression evaluating to 'KEEP' or 'DELETE'. If this specifier is omitted, the default value is 'DELETE' for a file that previously had a status of 'SCRATCH', and 'KEEP' otherwise. Under no circumstances can 'KEEP' be specified for a file opened with 'SCRATCH' status.
If 'KEEP' is specified for an existing file, the file continues to exist after the CLOSE statement is executed. Otherwise, 'KEEP' has no effect.
If 'DELETE' is specified, the file ceases to exist after the CLOSE statement is ex- ecuted.
Following normal program termination, all connected units are closed. Scratch units are deleted; all others are closed with disposition 'KEEP'.
Example:
CLOSE (3, ERR = 1020, STATUS ='KEEP')
6.2.3 BACKSPACE Statement
The BACKSPACE statement causes the file connected to the specified unit to be positioned before the preceding record. Its possible formats are
BACKSPACE unit
BACKSPACE (arg-list)
where 'unit' is an external unit specifier and
[UNIT =] unit | External unit specifier |
IOSTAT = stname | 110 status specifier |
ERR = stl | Error specifier |
The argument list must include an external unit specifier (section 6.2.1.1) and may contain an 110 status specifier (section 6.2.1.2) and an error specifier (section 6.2.1.3). The file being backspaced must be connected for sequential access.
If the file has no preceding record, the BACKSPACE statement has no effect. If the
Backspacing over a record written using
Examples:
BACKSPACE 3
BACKSPACE (3, ERR = 1020)
6.2.4 REWI N D Statement
The REWIND statement causes the file connected to the specified unit to be reposi- tioned at its initial point. The file must be connected for sequential access. The possible formats for the REWIND statement are
REWIND unit