Language Reference |
SETIN Statement |
The SETIN data set makes a data set the current input data set.
The arguments to the SETIN statement are as follows:
can be specified with a one-level name (for example, A) or a two-level name (for example, Sasuser.A). For more information about specifying SAS data sets, see the chapter on data sets in SAS Language Reference: Concepts.
is the name of a variable to contain the number of observations in the data set.
specifies the current observation.
The SETIN statement chooses the specified data set from among the data sets already opened for input by the EDIT or USE statement. This data set becomes the current input data set for subsequent data management statements. The NOBS option is not required. If specified, the NOBS option returns the number of observations in the data set in the scalar variable name. The POINT option makes the specified observation the current one. It positions the data set to a particular observation. The SHOW DATASETS command lists data sets already opened for input.
In the example that follows, if the data set WORK.A has 20 observations, the variable SIZE is set to 20. Also, the current observation is set to 10.
setin work.a nobs size point 10; list; /* lists observation 10 */
Copyright © SAS Institute, Inc. All Rights Reserved.