5 min read

How I Use SAS?

It’s pretty fun to read SAS/Graph expert Robert Allison’s note, Using SAS- A Case Study on his SAS programming environment, such as SAS version, OS, fileserver and editors. Here is my follow up:

SAS Version

I always want to keep pace with the latest SAS software; something I got it, sometime not. As of September 2013, I use SAS 9.4 in my workstation.

For different tasks, clients or their combinations, I should use specific versions of SAS in customers’ computing environment remotely or in virtual machines; they are mostly SAS 9.2 and 9.3. Occasionally I touch SAS 9.1.3 (which was my first SAS version in 2006) and even 8.2 for migration purpose.

I like the latest SAS because, I like all my desktop software and mobile apps to be updated, automatically at best. Although it is not necessary for some cases, I hate to have bits of yesterday’s food in my desktop. For SAS particularly, it doesn’t hurt to be move forward to the new version like 9.4 while I get bonus like ODS Reporting Writing Interface. Work with multiple versions of SAS and I find SAS codes themselves are amazingly portable across versions and OS (Dear R users—no offending, please rerun the R codes_ to generate the cover graph for [www.r-project.org_](http://www.r-project.org)).


I primarily work on Windows and run PC SAS. But even in Windows, I need to play with Unix/Linux SAS in such instances:

1. SAS Drug Development: For version 4.x, I use Google Chrome in Windows to open a web interface, then launch a SAs session (with a web editor). The SAS itself is Linux based.

2. SAS Integration Studio (DIS) and Enterprise Guide (EG): In some Windows machines, the DIS or EG is the only client available to talk with SAS which is installed in a Linux server. EG is great to connect multiple servers. DIS is primarily for ETL jobs, but it’s nice to have if you only want to run some SAS Base codes.

3. If I need to jump into the black Unix box, I use Putty or Cygwin to get a terminal, write and edit code in vi and run it on batch.

I rarely use SAS GUI (I use Xming to invoke it) in Unix; The X-window is ugly and to tell the truth, I don’t know how to play the program editor with line number like 0002! Sometime I use it to view the metadata tree.

DMS or Batch

In PC SAS, I use DMS (Display Manager System, the one with the Enhanced Editor) for interactive debugging. If all goes well, I will run them in batch just to double check everything is OK.

I run SAS in batch mode in Windows when use text editors (only) like VIM and Sublime Text with SAS configurations.

In Unix, I use a default editor vi to edit SAS code then run it in command line (the batch mode).


My favorite editors in Windows are Notepad++, VIM and Sublime Text. VIM and Sublime Text are great for writing while Notepad++ is perfect for viewing, finding and replacing. Since I got Sublime Text, I use it as partial replacement of VIM because it supports some basic VI operations.

In Unix, I use vi. That’s because I didn’t touch Emacs.

Viewing Outputs

I like the DMS in PC SAS because it supports all SAS elements, datasets, formats, macro catalogs and such. Before SAS 9.4, I also like to use SAS System Viewer to open SAS datasets. SAS Universal Viewer just sucks.

For PDF outputs, I use Foxit Reader. For HTML, I like Google Chrome.

In Unix, well, after batch run, I check the result in the mapped Windows driver.

SAS Products
  • SAS Base: Data Step, ODS, SQL, Macro, XML, Regular Expression, Reporting, ODS Graphics and whatever makes a SAS programmer. Love it.
  • SAS/Graph: I didn’t touch it since the ODS graphics available in SAS 9.2.
  • SAS/STAT: I’m not a statistician but a user. My favorite procedures are PROC TTEST, PROC FREQ, PROC GLM, PROC LOGISTIC, PROC LIFETEST, PROC PHREG which I use heavily as a statistical SAS programmer in clinical section.
  • SAS/IML: I didn’t touch it after 2010. That’s because I seldom find a machine licensed with IML! I think it would be good idea to put it to SAS Base.
  • SAS Data Integration Studio: For ETL. Sometimes it is my only client to talk with SAS.
  • SAS Enterprise Guide: It’s a great client to communicate with multiple SAS servers, but it is not 100% compatible with SAS Base (it’s sad). I like its editor and navigation panels. It will rock in the future.
  • SAS Clinical Toolkits and SAS Clinical Data Integration: For CDISC stuff. It’s my primary technical job working as a clinical consultant.
  • SAS Drug Development: A SAS hosting environment for pharmas.
  • SAS System Viewer: The good.
  • SAS Universal Viewer: The bad but it is the only option in most machines.
  • SAS XML Mapper: The primary tool I use to play with XML files.
  • SAS Power  and Sample Size: I checked it for a while to accompany with nQuery Advisor.
  • SAS PC File Server: a trouble maker when across Excel and SAS bitness (3264 bits); but if installed right, it’s nice tool to read Excel files across OS.
  • SAS Documentation Viewer: I like the SAS 9.4 Documentation Viewer. It’s much quicker. The only flaw is the lack of Favorite tab.