SETIN Statement
makes a data set current for input
- SETIN SAS-data-set <NOBS name>
<POINT operand>;
The inputs to the SETIN statement are as follows:
- SAS-data-set
- can be specified with a one-word name (for example,
A) or a two-word name (for example, SASUSER.A).
For more information on specifying SAS data sets,
see the chapter on data sets in SAS Language Reference: Concepts.
- name
- is the name of a variable to contain the
number of observations in the data set.
- operand
- 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 © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.