SEARCH UNIVERSITY LIBRARIES
SAS OnDemand for Academics (ODA) gives students and faculty free access to SAS Studio via your web browser. This makes it a great option for students who want to use SAS on a computer that doesn't (or can't) run the desktop version of SAS. There is no software to install, but it does require creating a profile with SAS and registering for SAS OnDemand for Academics.
In this tutorial, we'll first go over how to gain access to SAS Studio via SAS ODA. We'll then talk about the SAS Studio interface, and how to get data into your account.
Before you can begin using SAS OnDemand for Academics, you'll have to create a SAS Profile and register to use SAS OnDemand for Academics.
Prior to registering with SAS ODA, you must create a SAS Profile. If you are already a SAS user, you may already have an account and can skip to the next step. If you are new to SAS and need to create a profile, go to the SAS ODA welcome page and select "Don’t have a SAS Profile".
Once you’ve filled in the necessary information to create a profile with SAS, you will see the following message on the webpage. Follow the instructions to activate your SAS Profile.
Now that you have a SAS profile, you can register to use SAS OnDemand for Academics.
Return to the SAS OnDemand for Academics page. You will be prompted to select your home region before clicking Submit. Next, you will see a confirmation page like the one below. You will receive a follow-up email from SAS you will find your User ID for SAS ODA. You can use this User ID or your email address to sign in on the SAS ODA sign in page.
After you've successfully registered for SAS OnDemand for Academics, you can now login to the software.
To access SAS Studio and the SAS ODA dashboard, navigate to the welcome page. User your User ID and password to sign in. You will then see the SAS ODA dashboard.
If you want to jump into using SAS Studio, click SAS Studio. However, the dashboard has useful information about your account's permissions, course enrollments, and storage space. Here's what the different parts of this dashboard do:
The Applications tab contains the link to SAS Studio. To begin working in SAS Studio, simply click on SAS Studio.
If you are an instructor, you can invite students to enroll in a SAS OnDemand for Academics course. If you are a student and were invited to enroll in a course, you will see the course when you click on the Enrollments tab.
Any courses that you are enrolled in or teaching will appear under this tab.
Shows how much storage space has been used in your SAS ODA account. Each user has up to 5 GB of personal data storage. This includes all data and SAS files that are uploaded and imported into your instance of SAS Studio. Keep an eye on this quota -- you don't want to run out of space!
In this part of the tutorial, we'll start referring to SAS Studio instead of "SAS OnDemand for Academics". The name "SAS Studio" refers to the actual SAS software that runs in the browser (whereas the name "SAS OnDemand for Academics" is the name of the service that allows users to access SAS Studio).
After launching SAS Studio, the Navigation Pane appears on the left, and the Program window appears on the right. By default, the Program window opens to the Code tab. There are also tabs for the Log and Results within the Program window. SAS Studio also contains a main toolbar located in the top right corner of the browser window.
The left hand side of SAS Studio is dedicated to the Navigation Pane. By default, immediately visible are the Server Files and Folders. In SAS OnDemand for Academics, you can upload data and SAS files from your local computer.
There are two other notable drop downs within the navigation pane. First is Tasks and Utilities. If you click on the arrow next to Tasks and Utilities, you will be shown more options:
Tasks are SAS Studio’s version of a point-and-click interface. If you are not comfortable with writing code for SAS programs, then this is a viable option for you. There are predefined tasks within SAS Studio that generate SAS code and format results.
Also within Tasks and Utilities, you can import data using Import Data or with code in a new Program window.
The second notable drop down within the Navigation Pane is Libraries. If you click on the arrow next to Libraries, you will see the following icons:
When you first open SAS Studio, the four default libraries – SASHELP, SASUSER, WEBWORK, and WORK – are visible.If you define any other SAS libraries during your session, those will appear in this window as well. Clicking on any of these icons will open that library, where you can browse the data files stored in that library. Once a dataset has been referenced with a library name, it can be viewed via this window. Just locate the dataset and double-click on it. The data table will appear in the SAS environment.
Using libraries is an important part of working with data in SAS, so we recommend checking out our tutorial on SAS Libraries.
The Code tab within the Program window is where you create and edit your SAS program. A program is a series of commands (or statements) that tell SAS what actions to do and how to do them. The default Program automatically recognizes special keywords in your program and uses color to highlight them. This will help you know if what you are typing conforms to SAS syntax rules. SAS also warns you if a statement is invalid or out of place by changing the text color to red.
A key feature to SAS Studio is its ability to autocomplete SAS statements. The autocompletion applies to SAS code related to:
The autocomplete feature also provides built-in syntax help as seen in the image above. Another way to get syntax help within SAS Studio is to right-click the keyword (blue statements) and select Syntax Help.
The Code tab has a variety of icons in the toolbar. Most options available on toolbar are similar to other programs, but there are a few that are particular to SAS Studio. Here are descriptions of the most common SAS Studio-specific options in the toolbar:
|Submit||Executes any statements you've entered into the Code window. (If you have highlighted lines of codes in the Code window, clicking Submit will execute just those lines.)|
|Submission History||Displays a drop down of timestamped executed statements. Once you click on a previous statement, it will rerun the code.|
|Program Summary||This creates an HTML file in a new browser tab that displays the SAS code, Log notes, and Results. (Program Summary is only available after you have executed a statement.)|
|Add to my snippets||Snippets can be used to quickly insert SAS code. Adding your written SAS code as a snippet is useful if you frequently utilize customized SAS code.|
|Clear all code||This clears the current program’s code editor.|
|Go Interactive||A special mode in the SAS environment to use fully or partially interactive procedures (e.g., PROC SQL, PROC REG, PROC GLM).|
|Format code||This makes reading your code easier by adding line breaks and indentation to your lines of SAS code.|
The Log tab is one of the most important tools you have to troubleshoot problems in SAS! This is where error messages and warnings appear that can help you troubleshoot when a program isn’t working.
As you use SAS, the Log tab will report the success or failure of any SAS programs or code you execute. Specifically, the Log tab will show each line of code that has been executed, how long it took to execute, and what the result was. If there is an error in your code (or if SAS encounters a problem while trying to run your code), it will report error messages or warnings in the Log tab.
The Log tab uses color-coded text to communicate issues. Notes appear in blue, Warnings appear in green, and Errors appear in red. Notes are generally benign messages that confirm that your code was successfully executed. Warnings indicate when SAS found potential issues with the data or task, but was still able to run the code. Errors appear when SAS cannot execute the program statements you told it to run. Always check your Log tab every time you run a program or a piece of a program. This will ensure that you do not miss an Error, Warning, or Note.
The Log tab has a variety of icons in the toolbar that allow you to save or print the log, download as a HTML file, open in a new browser tab, clear the log, or maximize the window view:
By default SAS Studio automatically clears the Log with every executed statement. If you’d like to manually clear your log, change the preferences in Code and Log to Append log. You can find Preferences within the main toolbar in the top right corner.
The Results tab displays the printable results of any analysis you submitted in your program. It also serves as a table of contents for all output you've created during the current SAS session.
The Results tab has a variety of icons in the toolbar that allow you to download the results as HTML/PDF/RTF files, download or print the generated data, or open in a new browser tab:
The SAS Studio toolbar contains icons that allow you to access other components of SAS Studio:
|Search||Search all aspects of the Navigation pane. (The search will only include items of the selected area in the navigation pane.)|
|Open||Open a file stored in your in your SAS OnDemand for Academics account (such as a a SAS script or dataset).|
|New Options||Create a new SAS script or data import pipeline. Also contains the options to "close all tabs" and to enter or exit "Maximized View", which hides the navigation pane from the interface.|
|SAS Programmer||Toggle between the SAS Programmer perspective or Visual Programmer perspective.|
|More Application Options||
Change the preferences settings for how you want SAS Studio to function; Show/hide parts of the SAS Studio interface.
Caution: The options in this section can dramatically change how SAS Studio looks and acts, so you may want to avoid this section if you're not certain you need to use it.
|Help||Access SAS Studio Help, SAS Studio Documentation, SAS Studio Community, Keyboard shortcuts, and information about the current SAS Studio version you're using.|
Now that your account is set up, you're ready to start using SAS Studio!
If you have data or code files you want to start using in your SAS OnDemand for Academics account, you'll need to upload those files to your account, which we cover in the next tutorial: Importing Data into SAS OnDemand for Academics.