Referencing a SAS Library

Using a LIBNAME Statement

As you begin to write the program, remember that you might need to use a LIBNAME statement to reference the permanent SAS library in which the data set will be stored.
To do this...
Use this SAS statement...
Example
Reference a SAS library
LIBNAME statement
libname taxes 'c:\users\name\sasuser';
For example, the LIBNAME statement below assigns the libref Taxes to the SAS library in the folder C:\Acct\Qtr1\Report in the Windows environment.
libname taxes 'c:\acct\qtr1\report';
You do not need to use a LIBNAME statement in all situations. For example, if you are storing the data set in a temporary SAS data set or if SAS has automatically assigned the libref for the ...

Get SAS Certification Prep Guide: Base Programming for SAS 9, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.