USEDIRECTIO= Data Set Option: UNIX

Turns on direct file I/O for a library that contains the file to which the ENABLEDIRECTIO option has been applied.
Valid in: DATA step
Category: Data Set Control
Default: Off
Engine: V9, V8
UNIX specifics: To use this option, you must also use the ENABLEDIRECTIO option in the LIBNAME statement where the libref was assigned.

Syntax

USEDIRECTIO=

Details

The USEDIRECTIO= data set option turns on direct file I/O for a data set that is listed on a DATA statement. The associated libref must have been defined with the ENABLEDIRECTIO option in the LIBNAME statement.
Using ENABLEDIRECTIO on a LIBNAME statement makes direct file I/O possible for data sets in that library. Direct I/O itself is not turned on. You must use the USEDIRECTIO= option to produce direct file I/O.
You can turn on direct file I/O in two ways:
  • Use both the ENABLEDIRECTIO and USEDIRECTIO= options in the LIBNAME statement:
    libname libref-name '.' ENABLEDIRECTIO USEDIRECTIO=yes;
    In this case, SAS uses direct file I/O on all SAS I/O data sets that are opened using the libref libref-name.
  • Use ENABLEDIRECTIO in the LIBNAME statement and use USEDIRECTIO= in a DATA statement:
    libname libref-name '.' ENABLEDIRECTIO;
    data libref-name.data-set-name (USEDIRECTIO=yes);
    In this case, libref-name.data-set-name will be opened for direct file I/O. Other SAS I/O data sets referenced by libref-name will not use direct file I/O.
USEDIRECTIO= by itself has no effect. Neither of the following statements open a data set for direct file I/O:
libname libref-name '.' USEDIRECTIO=yes;
data libref-name.data-set-name (USEDIRECTIO=yes);

Example

The following example uses the ENABLEDIRECTIO LIBNAME option to enable files that are associated with the libref test to be opened for direct I/O. The USEDIRECTIO= data set option opens test.file1 for direct I/O. test.file2 is not opened for direct I/O.
LIBNAME test'.'ENABLEDIRECTIO;
data test.file1(USEDIRECTIO=yes);
   ... more SAS statements ...
run;
data test.file2;
   ... more SAS statements ...
run; 

See Also