What is a Library -
It is a collection of one or more SAS files that are recognized by SAS and stored as a unit. You reference a SAS library by a logical name called a libref.
At the beginning of each SAS session, SAS automatically creates at least one library that which is Work, Work is the temporary library, As soon as session terminated work library also get destroyed.
All SAS data sets have a two-level name that consists of the library name and the data set name.
When a data set is in the Work library, then it is not required to include the library name when you reference it.
Example -
Data EX; RUN;
Data Work.EX; RUN;
Both above datasets are same pointing to EX in work library.
Creating a Library
LIBNAME -
SAS library can be created using LIBNAME statement. The LIBNAME statement associates the name of the library, or libref, with the physical location of the library.
Clearing a Library -
LIBNAME Datahark Clear;
LIBNAME Datahark Clear;
proc contents data=SASHELP._all_ out=Libraries memtype=data noprint;run;Proc SQL;select DISTINCT MEMNAME from Libraries;quit;
0 Comments
If you have any doubt please comment or write us to - admin@datahark.com