You can create two types of indexes:
A simple index consists
of the values of one key variable, which can be character or numeric.
When you create a simple index, SAS names the index after the key
variable.
A composite index consists
of the values of multiple key variables, which can be character, numeric,
or a combination. The values of these key variables are concatenated
to form a single value. For example, if an index is built on the key
variables Lastname and Firstname, a value for the index includes the
value for Lastname followed by the value for Firstname. When you create
a composite index, you must specify a unique index name that is not
the name of any existing variable or index in the data set.
Often, only the first
variable of a composite index is used. In the example, you could use
the composite index that is specified in the example above (Lastname
plus Firstname) for a WHERE expression that uses only Lastname. For
example, the expression where Lastname='Smith'
uses
the composite index because Lastname is the first variable in the
index. That is, the value for Lastname is the first part of the value
that is listed in the index.