TEMP= LIBNAME Statement Option

Specifies to store the library in a temporary subdirectory of the primary directory.
Default: NO
Engine: SPD Engine only

Syntax

TEMP=YES | NO

Required Arguments

YES
specifies to create the temporary subdirectory.
NO
specifies not to create a temporary subdirectory.

Details

The TEMP= option creates a temporary subdirectory of the primary directory that was named in the LIBNAME statement. The subdirectory and all of its files contained are deleted at the end of the session.
You can use TEMP= with the SAS option USER= to create a temporary directory to store interim data sets that can be referenced with a single-level name.
Note: When using the SIGNON statement in SAS/CONNECT software, the INHERITLIB= option cannot refer to an SPD Engine library that was defined with the TEMP= option.

Example: Creating a Temporary Library

The following example illustrates two features:
  • the use of the TEMP= LIBNAME option to create a temporary library
  • the use of the USER= system option to enable the use of single-level table names for SPD Engine tables
A directory is created under mydata. The MASTERCOPY table has its metadata file stored in mydata. The data and index for MASTERCOPY are created in the locations specified in the DATAPATH= and INDEXPATH= options.
libname perm <masterdata>
libname mywork spde 'mydata'
   datapath=('/data01/mypath' '/data02/mypath' '/data03/mypath' '/data04/mypath')
   indexpath=('index/mypath') TEMP=YES;
option user=mywork;
data mastercopy (index=(lastname));
   set perm.customer;
   where region='W';
run;