Yue
2008-06-05 00:39:50 UTC
Hi, buddies,
This is a piece from the Base Prep. quote"
You can also define additional libraries. In fact, often the first
step in setting up your SAS session is to define the libraries.
To define a library, you assign a library name (a libref) to it and
specify a path, such as a directory path. You will use the libref as
the first part of the file's two-level name (libref.filename) to
reference the file within the library. You can use programming
statements to assign library names.
Assigning Librefs
To define libraries, you can use a LIBNAME statement. You can store
the LIBNAME statement with any SAS program so that the SAS data
library is assigned each time the program is submitted.
General form, basic LIBNAME statement:
LIBNAME libref 'SAS-data-library';
where
libref is 1 to 8 characters long, begins with a letter or underscore,
and contains only letters, numbers, or underscores.
SAS-data-library is the name of a SAS data library in which SAS data
files are stored. The specification of the physical name of the
library differs by operating environment.
" " "
My understanding of the statement "LIBNAME libref 'SAS-data-library';"
is
libref is the name you assign to the library
and 'SAS-data-library' is the path of it.
but we need to have a library existing there first.
However, I tried to create a library "BasePrep", I see it under Active
Libraries, and I use the statement:
LIBNAME SASBase 'G:\SAS\BasePrep';
instead assign the name SASBase to library BasePrep, It gives a new
library SASBase under Active Libraries and saying "NOTE: Library
SASBASE does not exist" in the log.
??????
thanks!
This is a piece from the Base Prep. quote"
You can also define additional libraries. In fact, often the first
step in setting up your SAS session is to define the libraries.
To define a library, you assign a library name (a libref) to it and
specify a path, such as a directory path. You will use the libref as
the first part of the file's two-level name (libref.filename) to
reference the file within the library. You can use programming
statements to assign library names.
Assigning Librefs
To define libraries, you can use a LIBNAME statement. You can store
the LIBNAME statement with any SAS program so that the SAS data
library is assigned each time the program is submitted.
General form, basic LIBNAME statement:
LIBNAME libref 'SAS-data-library';
where
libref is 1 to 8 characters long, begins with a letter or underscore,
and contains only letters, numbers, or underscores.
SAS-data-library is the name of a SAS data library in which SAS data
files are stored. The specification of the physical name of the
library differs by operating environment.
" " "
My understanding of the statement "LIBNAME libref 'SAS-data-library';"
is
libref is the name you assign to the library
and 'SAS-data-library' is the path of it.
but we need to have a library existing there first.
However, I tried to create a library "BasePrep", I see it under Active
Libraries, and I use the statement:
LIBNAME SASBase 'G:\SAS\BasePrep';
instead assign the name SASBase to library BasePrep, It gives a new
library SASBase under Active Libraries and saying "NOTE: Library
SASBASE does not exist" in the log.
??????
thanks!