ASYNCINDEX= Data Set Option

Specifies to create indexes in parallel when creating multiple indexes on an SPD Engine data set.

Valid in: DATASETS procedure or with the INDEX data set option
Default: NO
Engine: SPD Engine only

Syntax

ASYNCINDEX=YES | NO

Required Arguments

YES

creates the indexes in parallel (asynchronously).

NO

creates one index at a time (synchronously).

Details

The SPD Engine can create multiple indexes with a single scan of a data set. The SPD Engine spawns a single thread for each index created, and then processes the threads simultaneously. Although creating indexes in parallel is much faster than scanning the data set for each index, the default for this option is NO because parallel index creation requires extra utility space to store the sorting files and requires additional memory. If index creation fails due to insufficient resources, you can do one or both of the following:
  • Increase the size of the utility file space using the SPDEUTILLOC= system option.
  • Set the SAS system option to MEMSIZE=0 (footnote 1) and increase the utility space that is used for index sorting using the SPDEINDEXSORTSIZE= system option.

Example: Creating Indexes in Groups

The DATASETS procedure has the flexibility to use batched parallel index creation using multiple MODIFY groups. Instead of creating all of the indexes at once, which would require a significant amount of space, you can create the indexes in groups as shown in the following example. Indexes PatientNo and PatientClass are created together as are the indexes LastName and FirstName. The other indexes are created serially.
proc datasets lib=main;
   modify patients(asyncindex=yes);
      index create PatientNo PatientClass;
   run;
   modify patients(asyncindex=yes);
      index create LastName FirstName;
   run;
   modify patients(asyncindex=no);
      index create FullName=(LastName FirstName)
        ClassSex=(PatientClass PatientSex);
   run;
quit;
FOOTNOTE 1:For z/OS, increase the REGION size.[return]