Introduction

SAS (Statistical Analysis System) is a leading software for data analysis, statistical modeling, and machine learning, widely used in academia and industry. However, many believe SAS is inaccessible due to its high licensing costs. Fortunately, SAS offers a free cloud-based solution called SAS OnDemand for Academics, enabling students and researchers to leverage its full capabilities at no cost.

This guide provides a step-by-step approach to accessing SAS OnDemand, managing files, and running SAS programs effectively. By the end, you will be equipped with the foundational knowledge to perform professional statistical analysis using SAS.


1. Accessing SAS OnDemand for Free

Why Choose SAS OnDemand?

  • No installation required – Runs entirely in the cloud.
  • Free for students, educators, and independent learners.
  • Full-featured SAS Studio – Includes data management, analytics, and visualization tools.
  • Secure storage and access – Work on projects from any device.

Steps to Get Started:

  1. Visit the SAS OnDemand for Academics website.
  2. Click Sign Up and complete the registration process.
  3. Once registered, log in to the SAS OnDemand for Academics Dashboard.
  4. Open SAS Studio, the integrated development environment for writing and running SAS programs.
  5. Familiarize yourself with the interface, including the Server Files and Folders panel, the Code Editor, and the Log Window.

Once your account is active, you can upload files, write programs, and perform professional data analysis without any licensing fees.


2. Creating a Folder to Store Files

To efficiently manage your data and SAS programs, you need to create a dedicated folder in SAS Studio.

Steps:

  1. Open SAS Studio from the SAS OnDemand dashboard.
  2. In the Server Files and Folders panel, click NewFolder.
  3. Enter a folder name (e.g., MySASData) and click Save.
  4. Expand Files (Home) to confirm that your folder has been successfully created.
  5. Organize files logically by creating subfolders (e.g., datasets, programs).

3. Uploading Files to SAS OnDemand

SAS OnDemand allows you to upload various types of files, including:

  • Datasets (.csv, .xlsx, .sas7bdat)
  • SAS Programs (.sas)
  • Text Files (.txt)

Steps:

  1. Navigate to the folder you created (e.g., MySASData).
  2. Click on the Upload tool in SAS Studio.
  3. In the Upload Files window, click Choose Files.
  4. Browse your computer and select the file(s) you want to upload.
  5. Click OpenUpload.

Your file will now be available in the designated folder on the SAS server, ready for analysis.


4. Running Your First SAS Program

Once your files are uploaded, you can begin writing and executing SAS programs.

Example: Importing a CSV File and Running a Simple Analysis

/* Define a library to access uploaded files */
libname mydata "~/MySASData";

/* Import a CSV file */
proc import datafile="~/MySASData/mydataset.csv" 
    out=mydata.imported_data 
    dbms=csv 
    replace;
    getnames=yes;
run;

/* Display dataset structure */
proc contents data=mydata.imported_data;
run;

/* Display the first few rows */
proc print data=mydata.imported_data (obs=10);
run;

/* Generate summary statistics */
proc means data=mydata.imported_data n mean std min max;
run;

Explanation:

  • libname assigns a shortcut to reference your data folder.
  • proc import reads a CSV file and converts it into a SAS dataset.
  • proc contents displays metadata about the dataset (variables, formats, etc.).
  • proc print prints the first 10 rows to verify the data.
  • proc means calculates basic descriptive statistics (count, mean, standard deviation, min, max).

5. Writing and Running a SAS Program

SAS programs consist of Data Steps (for data manipulation) and Procedures (for statistical analysis). Below is a basic example of data transformation and visualization:

/* Creating a simple dataset */
data mydata.sales;
    input Month $ Revenue;
    datalines;
    Jan 5000
    Feb 7000
    Mar 6500
    Apr 8000
    ;
run;

/* Visualizing the data */
proc sgplot data=mydata.sales;
    vbar Month / response=Revenue datalabel;
    title "Monthly Sales Revenue";
run;

Explanation:

  • data step creates a small dataset using manual input.
  • proc sgplot generates a simple bar chart for visualization.
  • title adds a descriptive title to the plot.

Conclusion

SAS OnDemand for Academics provides a cost-free way to learn and use SAS for professional data analysis. By following this guide, you can set up your SAS environment, upload datasets, and start writing SAS programs with ease.

Key Takeaways:

  • SAS OnDemand is free and accessible online.
  • Creating organized folders helps manage files effectively.
  • Uploading datasets enables professional-level analysis.
  • Writing SAS programs allows for powerful data manipulation and statistical modeling.
  • Visualization tools like proc sgplot enhance data presentation.

By mastering these fundamentals, you can unlock the full potential of SAS for academic research and professional analytics.


Follow us for more expert SAS tutorials!

We extend our sincere gratitude to Dr. Dany Djeudeu, a dedicated Statistician and Machine Learning Scientist with over 10 years of experience in SAS, for expertly guiding you through this step-by-step journey to accessing and mastering SAS—from this first edition to many more exciting editions to come.