Chapter Contents

Previous

Next
The DATASETS Procedure

INDEX CREATE Statement


Creates simple or composite indexes in the SAS data set specified in the MODIFY statement.

Restriction: Must be in a MODIFY RUN group
See also: "SAS Files" in SAS Language: Reference
Featured in: Modifying SAS Data Sets


INDEX CREATE index-specification(s)
</ <NOMISS><UNIQUE>
<UPDATECENTILES= ALWAYS|NEVER|integer>>;


Required Arguments

index-specification(s)
can be one or both of the following forms:

variable
creates a simple index on the variable you specify.

index=(variables)
creates a composite index. The name you use for index is the name of the composite index. It must be a SAS name and cannot be the same as any variable name or any other composite index name. You must specify at least two variables.


Options

NOMISS
excludes from the index all observations with missing values for all index variables.

When you create an index with the NOMISS option, the SAS System uses the index only for WHERE processing and only when missing values fail to satisfy the WHERE clause. For example, if you use this WHERE statement

   where dept ne '01';
the SAS System does not use the index because missing values satisfy the WHERE clause. Refer to SAS Language Reference: Concepts.

Note:   BY-group processing ignores indexes that are created with the NOMISS option.  [cautionend]
Featured in: Modifying SAS Data Sets

UNIQUE
specifies that the combination of values of the index variables must be unique. If you specify UNIQUE and multiple observations have the same values for the index variables, the index is not created.
Featured in: Modifying SAS Data Sets

UPDATECENTILES=ALWAYS|NEVER|integer
specifies when the centiles are to be updated. It is not practical to update centiles after every data set update. Therefore, you can specify as the value of UPDATECENTILES the percent of the data values that can be changed before the centiles for the indexed variables are updated.

Valid values for UPDATECENTILES are

ALWAYS|0
Centiles are updated when the data set is closed if any changes have been made to the data set index.

NEVER|101
Centiles are not updated.

integer
The percent of values for the indexed variable that can be updated before the centiles are refreshed.
Alias: UPDCEN
Default 5 (percent)


How Indexes Are Affected by Changes to SAS Data Sets
Indexes are separate files in SAS data libraries, but in general, they are treated as an extension of the data set. Therefore, most data management tasks you perform on a data set also affect associated indexes, and the indexes continue to correspond to the data set. For example, if you change the name of a data set, any associated indexes continue to correspond to the data set.


Chapter Contents

Previous

Next

Top of Page

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