Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: minor formatting

SAS is a software suite that can mine, alter, manage and retrieve data from a variety of sources and perform statistical analysis on it.

Commands

The sas command is used to run SAS.

Local Details

Base SAS is available, providing the command-line sas program.

The GUI version of SAS is not currently available–run this on your workstation if needed.  Note that if you invoke sas with no filename arguments, it will try and fail to invoke the GUI version.  To avoid this, always specify a filename argument and/or the --nodms option.

sas is a single-core program.

Documentation

SAS Unix Guide – Wikipedia

Usage Examples

Hello World

Code Block
languagetext
themeEmacs
$ module load SAS

$ cat helloworld.sas
/* Print Hello World */
data _null_;
   put "Hello, World!";
run;

$ sas helloworld.sas

$ ls
helloworld.log  helloworld.sas

$ less helloworld.log
1   The SAS System                 09:44 Thursday, November 9, 2017

NOTE: Copyright (c) 2002-2010 by SAS Institute Inc., Cary, NC, USA. 
NOTE: SAS (r) Proprietary Software 9.3 (TS1M1) 
      Licensed to UNIVERSITY OF OREGON - SFA T&R, Site 70055064.
.
.
.
Hello, World!
NOTE: DATA statement used (Total process time):
      real time           0.11 seconds
      cpu time            0.00 seconds

...

Code Block
languagesass
themeEmacs
titleexample-1.saslinenumberstrue
DATA CLASS;
     INPUT NAME $ 1-8 SEX $ 10 AGE 12-13 HEIGHT 15-16 WEIGHT 18-22;
CARDS;
JOHN     M 12 59  99.5
JAMES    M 12 57  83.0
ALFRED   M 14 69 112.5
ALICE    F 13 56  84.0
PROC MEANS;
     VAR AGE HEIGHT WEIGHT;
PROC PLOT;
     PLOT WEIGHT*HEIGHT;
ENDSAS;
;

...