Requests generations for a data set and specifies the maximum
number of versions
| Valid in: |
DATA step and PROC steps
|
| Category: |
Data set control
|
|
GENMAX=number-of-generations
|
-
number-of-generations
-
requests generations for a data set and
specifies the maximum number of versions to maintain. The value can be from
0 to 1000. The default is GENMAX=0, which means that generations is not in
effect.
You use GENMAX= to request generations for a new data
set and to modify the number of generations on an existing data set. The first
time the data set is replaced, SAS keeps the replaced version and appends
a four-character version number to its member name, which includes # and a
three-digit number. For example, for a data set named A, a historical version
would be A#001.
Once generations is requested, its member name is limited
to 28 characters (rather than 32), because the last four characters are reserved
for the appended version number. When generations is not in effect (that is,
GENMAX=0), the member name can be up to 32 characters.
If you reduce the number of generations on an existing
data set, SAS deletes the oldest version(s) above the new limit.
For more details on generation data sets, see "SAS
Data Sets" in
SAS Language Reference: Concepts.
This example shows how to request generations for a new data
set. The DATA step creates a data set namedWORK.A that can have as many as
10 generations (one current version and nine historical versions):
data a(genmax=10);
x=1;
output;
run;
This example shows how to change the number of generations on
the data set MYLIB.A to 4:
proc datasets lib=mylib;
modify a(genmax=4);
run;
Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.