About the service
The SAS Teaching and Research service in Faculty of Health 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?
- 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 Faculty of Health, students and staff have access to the Faculty of Health SAS service upon request. Students from other faculties who are enrolled in Faculty of Health courses requiring SAS should have their course instructor contact Health 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 Edge
- 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 Faculty of Health 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 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
- Health 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.
- LinkedIn Learning has beginner, intermediate and advanced online courses on using SAS.
- There is extensive online help within SAS Studio (click on the question mark at the top right of the SAS Studio window).