Defines an index for a new output SAS data set.
Valid in: | DATA step and PROC steps |
Category: | Data Set Control |
Restriction: | Use with output data sets only. |
names and describes a simple or a composite index to be built.
is the name of a variable that forms the index or the name that you choose for a composite index.
is a list of variables to use in building a composite index.
specifies that the values of the key variables must be unique. If you specify UNIQUE for a new data set and multiple observations have the same values for the index variables, the index is not built. A slash (/) must precede the UNIQUE option.
excludes all observations with missing values from the index. Observations with missing values are still read from the data set, but not through the index. A slash (/) must precede the NOMISS option.
data new(index=(ssn));
data new(index=(cityst=(city state)));
data new(index=(ssn cityst=(city state)));
data new(index=(ssn /unique));
data new(index=(ssn /nomiss));
data new(index=(ssn /unique/nomiss cityst=(city state) /unique/nomiss));