Chapter Contents

Previous

Next
GENNUM=

GENNUM=



References a specific generation of a data set

Valid in: DATA step and PROC steps
Category: Data Set Control


Syntax
Syntax Description
Details
Examples
Example 1: Requesting a Version Using an Absolute Reference
Example 2: Requesting A Version Using a Relative Reference
See Also

Syntax

GENNUM=integer

Syntax Description

integer
is a number that references a specific version from a generation group. Specifying a positive number is an absolute reference to a specific version number that is appended to a data set's name. Specifying a negative number is a relative reference to a version in relation to the base version, from the youngest to the oldest. A value of 0 refers to the current (base) version. Specify an asterisk for integer when you rename the entire generation group for a data set.


Details

After generations for a data set have been requested using the GENMAX= data set option, use GENNUM= to request a specific version. For example, specifying GENNUM=3 refers to the historical version #003, while specifying GENNUM=-1 refers to the youngest historical version.

Note that after 999 replacements, the youngest version would be #999. After 1,000 replacements, SAS rolls over the youngest version number to #000. Therefore, if you want the historical version #000, specify GENNUM=1000.

For more details on generation data sets, see "SAS Data Sets" in SAS Language Reference: Concepts.


Examples

Example 1: Requesting a Version Using an Absolute Reference

This example prints the historical version #003 for data set A, using an absolute reference:

proc print data=a(gennum=3);
run;

Example 2: Requesting A Version Using a Relative Reference

The following PRINT procedure prints the data set three versions back from the base version:

proc print data=a(gennum-3);
run;

See Also

Data Set Option:

GENMAX=


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.