SAS OnlineTutor HomeFAQ PageSuggested Learning PathsContents+Searchback||next

Basic Concepts
Referencing SAS Files


Now that you understand how our sample program executes and the results it produces, let's look at the SAS files that it references.

Our sample program reads the SAS data set Clinic.Admit, creates the data set Clinic.Admit2, and prints the data set Clinic.Admit2. Notice that these files have two-part names with periods in the middle.

Referencing SAS data sets in a SAS program

Two-Level Names

To reference a SAS file in your SAS programs, you use a two-level name:

libref.filename

In the two-level name, libref is the name of the SAS library that contains the file, and filename is the name of the file itself. A period separates the libref and filename.

two-level name (libref.filename)

For example, in our sample program, Clinic.Admit is the two-level name for the SAS data set Admit, which is stored in the library named Clinic.


two-level name
Clinic . Admit


You'll learn more about SAS libraries later in this lesson. For now, let's assume that you have defined a library named Clinic.


back||next


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

Terms of Use & Legal Information | Privacy Statement