SAS Viya/Studio quick reference

SAS Studio is an advanced SAS analytics programming editor that combines the power of SAS analytics with the ease of use, flexibility and security of Data Studio. With SAS Studio you can access your Data Studio data files and work with the SAS programming language and a variety of world-class SAS analytics procedures.

New SAS programmers will find SAS Studio has many features that make it easy to develop robust SAS code. Advanced SAS programmers will find it has powerful options for building complex SAS programs. Here’s a general overview video on the basics of working with SAS Studio:
This document provides a brief description of the SAS Studio environment in the Data Studio and its commonly used procedures.


SAS Studio is optimized to work with the following browsers:

  • Google Chrome
  • Microsoft Edge

In addition, for best performance please select one of the following instance types when creating a SAS Studio Data Studio analysis:

  • i2.xlarge
  • i2.2xlarge
  • i2.4xlarge
  • i2.8xlarge

SAS Studio Interface

Once you have logged into SAS Studio, you can either start a new program or open an existing one.

  1. Main menu- complete set of options available in SAS Studio. 
  2. Navigation pane - provides easy access to your open files, your folder shortcuts and SAS content, your tasks and snippets, the libraries that you have access to, your Git repositories, and your file references.
  3. Work area - displays your data, code, tasks, logs, results, and flows. As you open these items, they are added to the work area as windows in a tabbed interface.

For more details about the SAS Studio interface and functionalities, read the official SAS Studio documentation.

Common SAS Studio actions

New Program

To start a new SAS program:

  1. On the main menu bar click New > SAS Program. A new blank program will open in the work area.

Save a Program

To save a SAS Program:

  1. Click Save on the work area toolbar.
  2. Select the location where you want to save your files. Learn more about available locations in the Data Studio environment.
  3. Enter the name of your Program.
  4. Click Save.

Open a Program

To open a SAS Program:

  1. Click  on the main menu bar.
  2. Find the location of the Program location in the left panel.
  3. Select the SAS Program you want to open in the right panel.  
  4. Click Open.

Run a Program

To run a selected portion of your SAS Program, highlight the portion you would like to run. To run a full SAS program, none of the code needs to be highlighted.

  1. Click on the work area toolbar.
  2. Open the Log tab to confirm that the Program ran properly.

SAS Viya Procedures

SAS procedures, also called “PROC steps”, are used for data management, data reporting, and many other forms statistical analysis. Listed in the table below are frequently used SAS procedures with a brief overview of each.  For more details on each procedure click the hyperlink on the procedure’s name.

APPENDAdds the observations from one SAS data set to the end of another SAS data set.
CASEnables you to interact with SAS Cloud Analytic Services (CAS) from the SAS client by providing you a programming environment based on the CASL language specification. 
CASUTILWorks with tables in SAS Cloud Analytic Services, SAS data sets in SAS libraries, and external files. 
COMPARECompares the contents of two SAS data sets, selected variables in different data sets, or variables within the same data set.
CONTENTSShows the contents of a SAS data set and prints the directory of the SAS library.
EXPORTReads data from a SAS data set and writes it to an external data source.
FEDSQLEnables you to submit FedSQL language statements from a Base SAS session.
IMPORTReads data from an external data source and writes it to a SAS data set. 
MEANSProvides data summarization tools to compute descriptive statistics for variables across all observations and within groups of observations. 
PRINTPrints the observations in a SAS data set or rows from a SAS Cloud Analytic Services (CAS) table using all or some of the variables.
REPORTCombines features of the PRINT, MEANS, and TABULATE procedures with features of the DATA step in a single report-writing tool that can produce a variety of reports. 
SORTOrders SAS data set observations by the values of one or more character or numeric variables. 
SQLImplements Structured Query Language (SQL) for SAS
SUMMARYProvides data summarization tools that compute descriptive statistics for variables across all observations or within groups of observations. 
TRANSPOSECreates an output data set by restructuring the values in a SAS data set, transposing selected variables into observations.