sas display manager windowshemken/sasworkshops/saswindows... · 2014-05-23 · sas interfaces...

27
SAS Display Manager Windows For Windows

Upload: others

Post on 14-Apr-2020

2 views

Category:

Documents


0 download

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

SAS Documentation

• Modular

• Concepts and Usage

• Proc syntax chapters

– Overview

– Syntax

– Details

– Examples