Reading Raw Data |
Referencing a SAS Data
Library |
Using a LIBNAME Statement
To begin the program, you use a LIBNAME statement to reference the SAS data library where the data set will be stored. |
To do this... | Use this SAS statement... |
Reference SAS data library | LIBNAME statement |
The LIBNAME statement below, for example, assigns the libref
Taxes to the SAS data library
C:\Users\Acct\Qtr1\Report in the Windows environment.
libname taxes 'c:\users\acct\qtr1\report'; |
In subsequent SAS programs, you use the libref as the first
part of the two-level name of the data set, as in this PROC PRINT step:
proc print data=taxes.netsales; run; |
The examples shown in this lesson show the location of files in the Windows environment. You can select LIBNAME to get more information on the LIBNAME statement or look at examples of how to specify the location of files on other operating systems. |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.