Data Set [10-14]
Accessing your own data sets II
Now that you have the data sets in the shared folder, you can access them by creating a library that connects to the shared folders.
This can be done by using a LIBNAME statement.
LIBNAME Proj1 "/folders/myfolders";
The LIBNAME statement consists of 3 parts:
This tells SAS to create a new library.
2. Library Name
The second part of the LIBNAME statement is the library name. In our example, it is PROJ1.
3. Directory Path
Lastly, you will have to associate the library with a shared folder.
In our example, the directory path to the shared folder is:
**** Important note ****
The directory path
is associated with the shared folder that you have created:
Any data set from myfolders can now be accessed in SAS Studio through the PROJ1 library.
Now, run the LIBNAME statement above:
LIBNAME PROJ1 "/folders/myfolders";
A new library called PROJ1 is created:
PROJ1 is directly connected to the myfolders, which is the shared folder that contains the car data set.
Now, you can access the car data set from PROJ1.
In our last exercise, we have saved the INCOME data set in the DS1 shared folder.
Write a SAS program to copy the INCOME data set into the WORK library.
Need some help?