sas display manager windowshemken/sasworkshops/saswindows... · 2014-05-23 · sas interfaces...
TRANSCRIPT
![Page 1: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/1.jpg)
SAS Display Manager Windows
For Windows
![Page 2: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/2.jpg)
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/
![Page 3: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/3.jpg)
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)
![Page 4: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/4.jpg)
Batch vs. DMS
• Completeness and order
• Ease of revision and re-running
![Page 5: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/5.jpg)
The SAS Windows
![Page 6: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/6.jpg)
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)
![Page 7: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/7.jpg)
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
![Page 8: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/8.jpg)
Enhanced Editor
![Page 9: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/9.jpg)
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
![Page 10: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/10.jpg)
Log window
![Page 11: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/11.jpg)
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
![Page 12: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/12.jpg)
Output window
![Page 13: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/13.jpg)
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
![Page 14: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/14.jpg)
Results window
![Page 15: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/15.jpg)
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
![Page 16: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/16.jpg)
Graph window
![Page 17: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/17.jpg)
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.
![Page 18: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/18.jpg)
Explorer window(on the left)
![Page 19: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/19.jpg)
Viewtable
![Page 20: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/20.jpg)
SAS Syntax
• PROCs– proc mean;
– proc freq;
• DATA steps
• Global statements– libname ;
– title;
– options;
![Page 21: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/21.jpg)
Statements
• Begin with a key word and end with a semi-colon– 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
![Page 22: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/22.jpg)
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
![Page 23: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/23.jpg)
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 */
![Page 24: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/24.jpg)
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.
![Page 25: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/25.jpg)
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.
![Page 26: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/26.jpg)
Other parts of the language
• SAS window commands
• Macros
• Within procs
– Model specification
– IML matrix language
– SQL database language
![Page 27: SAS Display Manager Windowshemken/SASworkshops/SASWindows... · 2014-05-23 · SAS Interfaces •There are several different ways to work with SAS, including batch processing, Display](https://reader030.vdocument.in/reader030/viewer/2022040920/5e98a7dfca73fa1e6532d77d/html5/thumbnails/27.jpg)
SAS Documentation
• Modular
• Concepts and Usage
• Proc syntax chapters
– Overview
– Syntax
– Details
– Examples