The Base SAS engine
detects possible damage to SAS data files (including indexes, integrity
constraints, and the audit file) and SAS catalogs and provides a means
for repairing some of the damage. If one of the following events
occurs while you are updating a SAS file, SAS can recover the file
and repair some of the damage:
-
A system failure occurs while the
data file or catalog is being updated.
-
The disk where the data file (including
the index file and audit file) or catalog is stored becomes full before
the file is completely written to it.
-
An input/output error occurs while
writing to the data file, index file, audit file, or catalog.
When the failure occurs,
the observations or records that were not written to the data file
or catalog are lost and some of the information about where values
are stored is inconsistent. The next time SAS reads the file, it
recognizes that the file's contents are damaged and repairs it to
the extent possible in accordance with the setting for the DLDMGACTION=
data set option or system option, unless the data set is truncated.
In this case, use the REPAIR statement to restore the data set.
If damage occurs to
the storage device where a data file resides, you can restore the
damaged data file, the index, and the audit file from a backup device.
Note: SAS is unable to repair or
recover a SAS view (a DATA step view, an SQL view, or a
SAS/ACCESS
view) or a stored compiled DATA step program. If a SAS file of type
VIEW or PROGRAM is damaged, you must recreate it.
Note: If the audit file for a SAS
data file becomes damaged, you cannot process the data file until
you terminate the audit trail. Then, you can initiate a new audit
file or process the data file without one.