Two-Pass Processing for SAS Threaded Applications

Two-pass processing occurs when a SAS Teradata requests that data be made available for multiple pass reading (that is, more than one pass through the data set). In the context of DBMS engines, this requires that as the data is read from the database, temporary spool files are written containing the read data. There is one temporary spool file per thread, and each spool file contains all data read on that thread. If three threads are specified for threaded Reads, three temporary spool files are written.
As the application requests subsequent passes of data, data is read from the temporary spool files, not reread from the database. The temporary spool files can be written on different disks, reducing any disk read contention, and enhancing performance. To accomplish this, the SAS option UTILLOC= is used to define different disk devices and directory paths when creating temporary spool files. There are several ways to specify this option.
  • In the SAS config file, add this line:
    –utilloc("C:\path" "D:\path" "E:\path")
  • Specify the UTILLOC= option on the SAS command line:
    /* on Windows */
    sas –utilloc(c:\path d:\path e:\path)
    
    /* on UNIX */
    sas –utilloc '(\path \path2 \path3)'
For more information about the UTILLOC= SAS system option, see the SAS System Options: Reference.