SAS Display Manager Windows For Windows
Computers with SAS software SSCC Windows Terminal Servers (Winstat) Linux Servers (linstat) Lab computers DoIT Info Labs (as of June 2014) In all Labs with Windows computers? See http://www.doit.wisc.edu/computer-labs/software/
SAS Interfaces There are several different ways to work with SAS, including batch processing, Display Manager windows, Enterprise Guide and other point-and-click graphical user interfaces, and SAS custom interfaces. In the SSC, our users primarily rely on batch processing (on linstat) and the Display Manager interface (on Winstat). (either option works in either environment)
Batch vs. DMS Completeness and order Ease of revision and re-running
The SAS Windows
SAS files Files and windows used: Data *.sas7bdat Explorer, Viewer Commands *.sas Editor Log *.log Log Results *.html, *.jpg Results (Results *.lis Output) (Graphs *.wmf, etc. Graph)
Command files Text files with *.sas file extension Enhanced editor Program editor (older/linux) Other text editors %include will read & execute another file in the middle of the current one
Enhanced Editor
Log files Another text file, with a *.log file extension Echos command lines Notes about processing ERROR messages and warnings put statements from DATA steps Clear the log window with Ctrl-e, or clear in the window command box
Log window
Output Output can be saved in several formats with ODS statements, including Word (*.rtf), PDF, and text. Save as text, *.lis. Output can be saved as data via ODS. Many statistical procedures have output statements as well. Log and Output may also be sent directly to a file with proc printto
Output window
Results and Output The Results window gives you a means of navigating Output, but is not (usually) saved. Allows some editing of the Output window Delete selections Save selections
Results window
Graphs May be saved in SAS form (*.sas7bcat), or more often exported (*.wmf) Can be included in many documents created by ODS Most statistical have an associated set of graphs produced with ODS GRAPHICS Navigate with Results
Graph window
Data Mostly opened and saved with DATA steps (*.sas7bdat) May also be copied/moved with the SAS Explorer View files by finding them in the SAS Explorer and opening as a Viewtable proc print writes data values to Output Use put statements to write data values to the Log or to ASCII files.
Explorer window (on the left)
Viewtable
SAS Syntax PROCs proc mean; proc freq; DATA steps Global statements libname ; title; options;
Statements Begin with a key word and end with a semicolon proc means; var age; Groups of statements run together (mostly) End of a group is signaled by run; or the beginning of another proc or data step
Syntax Rules Capitalization doesn t matter SAS names (names you give to objects like variables and data sets) are composed of letters, numerals, and underscores. No spaces or other special characters. White space doesn t matter to SAS
Comments Comments (text not interpreted as a command) Statement * a statement comment; Block /* a block comment; can be within a line or wrap over more than one line */
Data set names Data sets may be addressed by either their operating system name ( y:\sas\data\mendotaice ) or by their SAS name. SAS names have two parts, a library name and a data set name You have to assign a library name to an operating system folder in order to use the library name.
Temporary data sets SAS has a special library for temporary data sets called WORK. This is also the default library used when no library is explicitly mentioned.
Other parts of the language SAS window commands Macros Within procs Model specification IML matrix language SQL database language
SAS Documentation Modular Concepts and Usage Proc syntax chapters Overview Syntax Details Examples