Introduction to SAS [16-19]

h

Saving a SAS Data Set

Saving a data set is similar to accessing an external SAS data set.

You need to:

  • First create the library that connects to a particular location on the server (or a folder on your machine, if you are not using SAS OnDemand for Academics).
  • Copy the data set into this library.

Example

Libname Proj1 '/home/kisumsam';

Data Test;
    a = 1;
Run;

Data Proj1.Test;
    Set Test;
Run;
Picture

The data set will then be saved on the SAS server:

Picture

To download the file to your PC, you can simply right click on the data set, and click Download File:

Picture

💪 Sign up for a free SASCrunch account now and keep track of your learning progress!


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?

Get Hint

Get Solution