General form, PROC DATASETS
to create and delete an index:
PROC DATASETS LIBRARY= libref <NOLIST>;
MODIFY SAS-data-set-name;
INDEX
DELETE index-name;
INDEX
CREATE index-specification;
QUIT;
libref
points to the SAS library
that contains SAS-data-set-name.
NOLIST
option suppresses the
printing of the directory of SAS files in the SAS log and as ODS output.
index-name
is the name of an existing
index to be deleted.
index-specification
for a simple index
is the name of the key variable.
index-specification
for a composite index
is index-name=(variable-1...variable-n).
|
proc datasets library=sasuser nolist; modify sale2000; index create origin; quit;
proc datasets library=sasuser nolist; modify sale2000; index delete origin; index create flightid; index create Fromto=(origin dest); quit;