SAS 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 Data Studio and its commonly used procedures.

SAS Studio Interface

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

  1. Menu Bar: General SAS Studio analysis management options.

  2. Toolbar: Frequently used actions within SAS Studio.

  3. Code Editor: The primary workspace for creating and editing SAS programs or scripts.

  4. Navigation pane:

    1. Server files and folders: Displays files and directories in your current SAS Studio environment.
    2. Tasks and Utilities: Provides guided task-based interfaces for common SAS procedures and analyses.
    3. Snippets: Readily available SAS Studio samples of commonly used code. SAS Studio comes with predefined code snippets, which you can also copy, edit or create custom ones.
    4. Libraries: Libraries contain SAS tables that you can access and open from this section.
    5. File Shortcuts: Add shortcut to a file or folder for easier access.
  5. Log, ResultsOutput Data:

    1. Log: Captures messages and notifications generated during code execution
    2. Results: Displays graphical output such as charts and plots generated by SAS procedures.
    3. Output Data: Presents textual output produced by SAS procedures.
  6. Session control: Exit SAS Studio and end your session.

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

Your project data in SAS Studio

The navigation pane on the left contains the Server Files and Folders navigation item, which is how the data from your current Platform project is made available in the analysis. Under the Server Files and Folders> My Folders path, you can find the following subfolders:

  • output-files: This is the target directory to store files that you want to save as outputs of your analysis.
  • project-files: These are the files from the project in which your analysis is located
  • workspace: This is the default directory where your analysis takes place. 
    Learn more about the Data Studio editor and folder structure.

Customizing your workspace

You can tailor the appearance and layout of SAS Studio according to your preferences:

  • Click  and open the View menu to access customization options for panes and windows.
  • Resize windows by utilizing the resizing handles located in the corners of each window.
  • Adjust the size of panes by dragging the borders between them to optimize your workspace layout.
    By familiarizing yourself with the SAS Studio interface and its customization features, you can streamline your data analysis workflow and leverage the full capabilities of the SAS platform.

Common SAS Studio actions

New Program

To start a new SAS program:

  1. In the navigation pane on the left select Server Files and Folders.
  2. Click the new icon  and select SAS Program. Alternatively, press F4 on the keyboard. 
    A new tab with a new blank program opens 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. In the navigation panel on the left, find the location of your Program.
  2. Double click the SAS Program you want to open. The program opens in a new tab in the work area.

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 Run  on the work area toolbar. Your program is executed. The Log tab opens automatically, showing the program execution log.