TEMP= LIBNAME Statement Option

Creates a temporary server domain for this LIBNAME assignment.

Valid in: SPD Server LIBNAME Statement
Default: NO

Syntax

TEMP=YES | NO

Required Arguments

YES

creates a temporary server domain for the LIBNAME assignment.

NO

does not create a temporary server domain.

Details

Use this option to create a temporary server domain that exists for the duration of the LIBNAME assignment. A temporary server domain is similar to the SAS Work library. When you specify TEMP=YES in the LIBNAME statement, any data objects, tables, catalogs, or utility files that are created in the referenced domain are automatically deleted when you end the SAS session. The temporary domain is created as a subdirectory of the pathname defined for the server domain by administrators and is later deleted by the server.
If you specify USER as the libref in a LIBNAME statement that specifies TEMP=YES, then both table references that use a one-level name (MyTable) and table references that specify the USER libref (User.MyTable) are created in the temporary server domain.
If you want some but not all one-level table references to be processed by the server, use the USER= system option to make the temporary domain assignment instead of using the USER libref. For more information, seeSpecify Other Libref with TEMP=YES.

Examples

Example 1: Specify Libref USER and TEMP=YES

libname user sasspds 'mydomain'
   server=kaboom.5191
   user='siteusr1'
   prompt=yes
   temp=yes ;
When the libref USER is specified with TEMP=YES, all one-level table references (MyTable) and table references qualified by the libref USER (User.MyTable) are processed by and temporarily stored on the server.

Example 2: Specify Other Libref with TEMP=YES

libname mylib sasspds 'mydomain'
   server=kaboom.5191
   user='siteusr1'
   prompt=yes
   temp=yes ;
When libref MyLib is specified with TEMP=YES, only table references that are qualified by the libref (MyLib.MyTable) are processed by and temporarily stored on the server. One-level table references are created as SAS tables in the Work library.
To make a particular one-level table reference to go to server temporary storage, set the USER= system option as follows:
option user=MyLib;
data MyTable;
 set OtherTable;
run;
options user='';
The OPTIONS statement enables USER access via libref MyLib. Table MyTable is temporarily created in domain MyDomain. Submitting the USER= system option without a value clears the USER library assignment.
Last updated: February 8, 2017