DATASETS Procedure

INDEX CREATE Statement

Creates simple or composite indexes for the SAS data set specified in the MODIFY statement.
Restriction: Must be in a MODIFY RUN group
See: Understanding SAS Indexes in SAS Language Reference: Concepts
Modifying SAS Data Sets

Syntax

Required Argument

index-specification(s)
can be one or both of the following forms:
variable
creates a simple index on the specified variable.
index=(variables)
creates a composite index. The name that you specify for index is the name of the composite index. It must be a valid SAS name and cannot be the same as any variable name or any other composite index name. You must specify at least two variables.
Note:The index name must follow the same rules as a SAS variable name, including avoiding the use of reserved names for automatic variables, such as _N_, and special variable list names, such as _ALL_. For more information, refer to “Rules for Words and Names in the SAS Language” in SAS Language Reference: Concepts.

Optional Arguments

NOMISS
excludes from the index all observations with missing values for all index variables.
When you create an index with the NOMISS option, SAS uses the index only for WHERE processing and only when missing values fail to satisfy the WHERE expression. For example, if you use the following WHERE statement, SAS does not use the index, because missing values satisfy the WHERE expression:
   where dept ne '01';
Refer to SAS Language Reference: Concepts.
BY-group processing ignores indexes that are created with the NOMISS option.
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.
UPDATECENTILES=ALWAYS | NEVER | integer
specifies when centiles are to be updated. It is not practical to update centiles after every data set update. Therefore, you can specify the percentage of the data values that can be changed before centiles for the indexed variables are updated. The following is a list of valid values:
ALWAYS | 0
updates centiles when the data set is closed if any changes have been made to the data set index. You can specify ALWAYS or 0 and produce the same results.
NEVER | 101
does not update centiles. You can specify NEVER or 101 and produce the same results.
integer
specifies the percentage of values for the indexed variable that can be updated before centiles are refreshed.
Alias:UPDCEN
Default:5 (percent)