SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Basic Concepts
Referencing SAS Files


Referencing Permanent SAS Files

You can tell that Clinic.Admit and Clinic.Admit2 are permanent SAS data sets because the library name is Clinic, not Work. (Recall from Working in the SAS Environment that Work is the temporary SAS library that is deleted at the end of your SAS session.)


Permanent
SAS Files
two-level name       two-level name
Clinic
.
Admit
Clinic
.
Admit2
        


So, referencing a SAS file in any library except Work indicates that the SAS file is stored permanently. For example, when our sample program creates Clinic.Admit2, it stores the new Admit2 data set permanently in the Clinic library.


Referencing Temporary SAS Files

To reference temporary SAS files, you specify the default libref Work, a period, and the filename. For example, the two-level name Work.Test references the SAS data set named Test stored in the temporary Work library.


Temporary
SAS File
two-level name
Work
.
Test


Alternately, you can simply use a one-level name (the filename only) to reference a file in a temporary SAS library. When you specify a one-level name, the default libref Work is assumed. For example, the one-level name Test references the SAS data set named Test, which is stored in the temporary Work library.


Temporary
SAS File,
One-Level
Name
one-level name
         

Test


back||next


Copyright © 2002 SAS Institute Inc., Cary, NC, USA. All rights reserved.

Terms of Use & Legal Information | Privacy Statement