Chapter Contents |
Previous |
Next |
GENMAX= |
Valid in: | DATA step and PROC steps |
Category: | Data Set Control |
Syntax | |
Syntax Description | |
Details | |
Examples | |
Example 1: Requesting Generations When You Create a Data Set | |
Example 2: Modifying the Number of Generations on an Existing Data Set | |
See Also |
Syntax |
GENMAX=number-of-generations |
Details |
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.
Examples |
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;
See Also |
Data Set Option:
|
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.