Saving a SAS Data Set
If you want to save a SAS data set, you will have to copy the data set into a library that is connected to a folder on your SAS server.
Example
Libname Proj1 '/home/kisumsam';
Data Test;
a = 1;
Run;
Data Proj1.Test;
Set Test;
Run;
The data set will then be saved on the SAS server:
To download the file to your PC, you can simply right click on the data set, and click Download File:
Select the location. Your file will then be downloaded to your PC.
Exercise
Locate the CP951 data set in the SASHELP library.
Save the CP951 data set into the home directory of the SAS server.
Need some help?
HINT:
Create the library associated with the home directory on the SAS server. Then copy the data set into the newly-created library using the SET statement.
SOLUTION:
Libname PROJ1 ‘/home/your_user_name’;
Data PROJ1.CP951;
Set SASHelp.CP951;
Run;
Note: you do not need to run the LIBNAME statement if the library has already been defined.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |