The AGE statement renames
the
current-name to the name of the first
name in the
related-SAS-files, renames
the first name in the
related-SAS-files to
the second name in the
related-SAS-files,
and so on, until it changes the name of the next-to-last SAS file
in the
related-SAS-files to the last name
in the
related-SAS-files. The AGE statement
then deletes the last file in the
related-SAS-files.
If the first SAS file
named in the AGE statement does not exist in the SAS library, PROC
DATASETS stops processing the RUN group containing the AGE statement
and issues an error message. The AGE statement does not age any of
the
related-SAS-files. To override this
behavior, use the NOWARN option in the PROC DATASETS statement.
If one of the
related-SAS-files does
not exist, the procedure prints a warning message to the SAS log but
continues to age the SAS files that it can.
If you age a data set
that has an index, the index continues to correspond to the data set.
You can age only entire
generation groups. For example, if data sets A and B have generation
groups, then the following statement deletes generation group B and
ages (renames) generation group A to the name B:
age a b;
For
example, suppose the generation group for data set A has three historical
versions and the generation group for data set B has two historical
versions. Then aging A to B has this effect: