Professional Documents
Culture Documents
Sas Libname
Sas Libname
Sas Libname
Create a library 1 of 4
Overview
In Work with SAS data sets, you learned that before you access a SAS file, you generally define
a SAS library to show SAS where the file is.
You've already created a SAS library interactively by using the New Library window. Another
way to define a SAS library is by using a LIBNAME statement. The LIBNAME statement
The advantage of the LIBNAME statement is that you can store it in a SAS program to reference
the SAS library automatically when you submit the program.
Once the libref is assigned, you can read, create, or update files in a SAS library. In SAS
programs, you specify the libref as the first part of the two-level name for the SAS file:
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.
http://127.0.0.1:50712/help/sastut.hlp/m6_1.htm 8/3/2015
Create a library (1 of 4) Page 2 of 2
If you have licensed one or more SAS/ACCESS products, you can create a SAS library that
references a relational DBMS database, schema, server, or group of tables and views.
Point-and-Click Method
http://127.0.0.1:50712/help/sastut.hlp/m6_1.htm 8/3/2015