SAS Institute. The Power to Know

SAS(R) 9.2 Companion for UNIX Environments

space
Previous Page | Next Page

Using SAS Files

Using Direct I/O


Introduction to Direct I/O

Direct I/O is a method for processing input and output files and is used in file handling. Direct I/O enables SAS to read files from and write files directly to storage devices without first going through the UNIX operating environment's read and write caches. You can use direct I/O for SAS files. Using direct I/O might improve system performance, depending on the number and types of jobs that you are running.

SAS uses three related options that affect direct I/O:

  • ENABLEDIRECTIO statement option

  • USEDIRECTIO statement option

  • USEDIRECTIO data set option

The ENABLEDIRECTIO option in the LIBNAME statement makes direct I/O processing available for data sets that are listed in the DATA statement. The libref that points to the data sets must have been defined in a LIBNAME statement that uses the ENABLEDIRECTIO option. Using ENABLEDIRECTIO itself does not turn on direct I/O.

The USEDIRECTIO data set option on the DATA statement, or the USEDIRECTIO statement option on the LIBNAME statement, turns on direct I/O for those data sets to which the ENABLEDIRECTIO statement option has been applied. Using USEDIRECTIO without first using the ENABLEDIRECTIO option has no affect on direct I/O.


Turning on Direct I/O

You can turn on direct I/O in two ways:

  • Use both the ENABLEDIRECTIO and USEDIRECTIO options in the LIBNAME statement.

    This method opens for direct I/O all of the files that are referenced by the libref in the LIBNAME statement.

  • Use the ENABLEDIRECTIO option in the LIBNAME statement to render direct I/O available, and use the USEDIRECTIO data set option in a DATA statement to turn on direct I/O functionality.

    This method opens for direct I/O only the data set that is referenced by the libref on the LIBNAME statement.

For more information about these options and how they are used, see:

ENABLEDIRECTIO in Engine/Host Options section of the LIBNAME statement

USEDIRECTIO in Engine/Host Options section of the LIBNAME statement

USEDIRECTIO data set option

space
Previous Page | Next Page | Top of Page