About the service
The SAS Teaching and Research service in AHS is run on servers located in the faculty.
- Who can use the service?
- How do I use the service?
- Where are my files stored?
- Why should I use this service instead of running SAS locally?
- Are there cases where the SAS server is not a good choice?
- What is the difference between SAS on the server and the free SAS University Edition?
- How do I use SAS installed locally (on a lab or personal computer) with data on the server?
- How do I run R code in my SAS program?
- Where do I go for help?
All AHS faculty, students and staff have access to the AHS SAS service upon request. Students from other faculties who are enrolled in AHS courses requiring SAS should have their course instructor contact AHS Computing and request access for the term.
- To access SAS, open the following location in a web browser: https://ahs-sas-edu.uwaterloo.ca/SASStudio.
- Log in with your 8-character WatIAM/Quest/Email userid and password - no nexus\ prefix or @uwaterloo.ca suffix
- While we’ve had success with a wide variety of browsers, the officially supported browsers are:
- Microsoft Internet Explorer 9, 10, 11
- Mozilla Firefox 21+
- Google Chrome 27+
- Apple Safari 6.0+ (on Apple OS X)
- If you are connecting from off-campus, you will need to use the campus VPN service to connect to the campus and then access the AHS SAS service using your browser and the address https://ahs-sas-edu.uwaterloo.ca/SASStudio.
- Your files are stored centrally on the server with each user having a dedicated storage area. The full network path to your data is: \\ahs-sas-appserv.nexus.uwaterloo.ca\sasusers$\userid (where userid is your 8-character logon id). Note: this can often be shortened to just "\\ahs-sas-appserv\sasusers$\userid"
- If you have existing files on your PC or Mac, you can upload them to the server using the SAS Studio web interface.
- If you have SAS files on servers elsewhere on campus (e.g. N: drive, Research server space), you can reference those files from within SAS Studio by entering the server path in your SAS code.
- For example, undergraduate students with SAS files are on their N: drive can access these files in programs by using the \\files\students$\userid (where userid is your 8-character logon id).
- Similarly, graduate students will find their N: drive SAS files at \\fileu\users$\userid.
- To view your code and data stored elsewhere on the network, you can create a Folder shortcut in SAS to that location (you just need to know the full path (e.g. \\ahsfile\researchdata$\):
Right-click on the “Folder Shortcuts” folder and choose New – Folder Shortcut
In the resulting popup window:
Give it a name (we recommend NOT having any spaces in the name)
Set the folder type as SAS Server Folder
Enter the path to your data in the Directory field (e.g. \\ahsfile\researchdata$\).
- The biggest benefit of using the service is that you can get at your data and programs with only a network connection and a browser.
- Data storage on the server is backed up at three intervals:
- hourly (kept for 48 hours)
- daily (kept for 14 days)
- weekly (kept for 17 weeks)
- If you want or need to access your data offline (without an internet connection) you will need to have SAS installed locally on your computer.
- There are some SAS products that are not licensed to run on the SAS server and would need to be installed and run locally. You can still use a local install with network stored data (see next point).
- If you are working with Protected data, the SAS server is not an appropriate choice as the infrastructure has not been audited or approved for use by Public Works Canada.
You can download and install the free SAS University Edition. The SAS University Edition includes the following (see feature sheet):
- Base SAS. Make programming fast and easy with the SAS programming language, ODS Graphics and reporting procedures.
- SAS/STAT®. Trust our proven reliability with a wide variety of statistical methods and techniques.
- SAS/IML®. Use this matrix programming language for more specialized analyses and data exploration.
- SAS Studio. Reduce your programming time with autocomplete for hundreds of SAS statements and procedures, as well as built-in syntax help. You can use Jupyter Notebook as an alternative interface.
- SAS/ACCESS®. Seamlessly connect with your data, no matter where it resides.
- SAS/ETS®. Includes time series forecasting procedures: TIMEDATA, TIMESERIES, ARIMA, ESM, UCM and TIMEID
SAS on the server includes all of the SAS University Edition components with the addition of:
- SAS/AF. A development environment that enables you to create portable, point-and-click applications.
- SAS/ASSIST. A menu-driven, task-oriented interface to the SAS System.
- SAS Bridge for Esri. Provides the ability to exchange spatial data between ArcGIS and SAS.
- SAS CONNECT. Provides the ability to manage, access, and process data in a distributed and parallel SAS environment.
- SAS/EIS. Summarize, integrate and display information in easily accessed and easily understood reports.
- SAS Enterprise Guide
- SAS/FSP. Perform full-screen, interactive data entry, data editing, data retrieval, and data query.
- SAS/GRAPH. Creates and delivers accurate, high-impact visuals.
- SAS Integration Technologies. Integrate SAS with other applications.
- SAS/OR. Optimization, scheduling, simulation, and related modeling and solution capabilities
- SAS/QC. Tools for statistical quality improvement
- SAS/SHARE. Consolidate multiple shared data libraries.
- You will need to ensure that your data are stored on network server (not local hard drives or USB storage drives) and that your SAS coding uses the network location address. For example (with userid fflintst): libname cat "\\ahs-sas-appserv\sasusers$\fflintst\studydata2016\";
To run R code inside your SAS program, enclose the R code segment between the "submit" and "endsubmit" statements :
submit / R; >>> R code goes here endsubmit;
A couple of things to note:
- You should set your R working directory to the full network path where your files are stored.
- In order to graph, you will need to use the png or pdf functions in R to generate files (in your current working directory).
Here is a code sample you can try (but you need to edit the path in the R code setwd function).
See SAS documentation: Calling R Packages from PROC IML
- AHS Computing can provide assistance if you are having difficulty logging in to the service.
- If you need assistance with SAS programming, you should contact your course TA or instructor.
- SAS offers free tutorials and some free e-Learning courses that can help you get up and running.
- Lynda.com has beginner, intermediate and advanced online courses on using SAS. More information on using Lynda.com is available on the IST website.
- There is extensive online help within SAS Studio (click on the question mark at the top right of the SAS Studio window).