Skip Navigation

UNC Carolina Population Center

 

What is the WORK library?

When no library reference (a.k.a. libref) is specified along with a SAS data set name, SAS assumes you meant to reference the WORK library:

libname in8 v8 "d:\my project\data\";

data new;
 set  in8.children2_18;
run;


SAS interprets the data statement to really look like:
data WORK.new;

In your log you will see a note that looks something like this:
NOTE: The data set WORK.TEST has 21662 observations and 353 variables.

The WORK library is a temporary directory that exists on the machine that is processing your SAS program that SAS creates during your SAS session to store all temporary files.  At the end of  your SAS session SAS deletes all the files in this directory and removes the directory.

Questions:

1. What is a SAS session?  Answer.


2. What machine is processing my SAS program? Answer.



Answers:

1.  A  SAS session can be either the time during which you are using SAS interactively (you have windows of SAS open) or the time during which your program is running in batch.



2.  When you click on the SAS icon to start up SAS on your PC, then your PC is processing your SAS program.  When you connect to a Linux or Unix super computer and then start a SAS session or submit a SAS job, then that super computer is processing your SAS program.

Review again?
Another topic?
Questions or comments?  If you are affiliated to the Carolina Population Center, send them to Phil Bardsley; non-affiliates may contact the author Dan Blanchette.