The MCHP SAS MANUAL - Windows

         

Home    Contents

GENERAL GUIDELINES:
Windows in SAS
File management

The SAS Program
Program syntax
Debugging tips


 USING SAS PROGRAMMING TO: 
   
1. Prepare the data set 
   Types of data 
   Example programs    
    
2. View the data
   SAS Procedures
  
3. Explore the data  
   Numeric statistics    
   Frequency tables    
    
4. Manipulate the data  
   Basic techniques    
   New variables
  
5. Adding Variables and 
Observations to Data Sets
   The SET Statement
   The MERGE Statement

6. Data Processing
   ARRAY Statement
   Do Loops
   By-Group Processing
   RETAIN Statement
  
NON-PROGRAMMING 
      Alternatives

 
SAMPLE DATA SETS: 
 Height/weight
 Height/weight/region
 Simulated clinical data 
 Simulated Manitoba Health 
    

GENERAL GUIDELINES: WINDOWS IN SAS

This section provides a brief overview of the SAS windows environment, of how to navigate within and among windows. Navigation commands can be carried out in several ways:

  • Command line - the command can be typed in the command box at the upper left of the screen, or window-specific commands can be typed on a command line (invoked using Tools/Options/Preferences/View in the SAS menu). This method tends to be used less frequently because of the ease of use of the other, newer, ways of navigating SAS windows.
  • Pull-down menus - invoked by left-clicking on a menu heading. Different menu options are available, depending on which window is activated.
  • Pop-up menus - invoked by right-clicking on a window. Most windows will have this option. They provide a useful way of accessing Help menus.
  • Keys window - assigns commands to keys/key combinations (see description of Keys window below). Right clicking on this window will display a pop-up menu which includes a Help option; Help/Using This Window can be accessed to obtain a list of examples of key commands.
  • Toolbars - icons that provide shortcuts for a number of commands; toolbars can be customized by going to the Tools/Customize menu. The Programming Windows icon on the toolbar, for example, can be used to restore the windows display to their default setting.

When SAS is invoked five windows are automatically opened, displaying labeled bars below each window. Left-clicking on any of the five bars will activate the window. This is important for carrying out any of the commands associated with a window.

The five windows are:

  1. Program editor - is used for creating and editing SAS programs (and other kinds of ASCII files). Such tasks can also be accomplished with the Notepad window (opened through the Explorer window File/New/Source Program). SAS does not do anything with material entered here until the program is submitted for processing (Submit/Run on the Program Editor menu, or the runner on the toolbar).

  2. Log - displays information, once a SAS program is submitted for processing, about how the program ran, or processed the information. It is extremely important to examine the SAS log and to understand its messages in order to ensure that output has been generated as instructed; they facilitate any debugging that may be required.

  3. Output - displays output, once a SAS program is submitted, such as tables and graphs (if this is what has been specified in the program).

  4. Results - this window helps to manage SAS output.

  5. Explorer - this window is used to view and manage files/data sets (similar to the Microsoft Windows version of Explorer). SAS libraries, files, and shortcuts can be created within this window.

Another useful window is the Keys window, for creating shortcuts. This window is called up from the Options menu, and shows how commands have been assigned to various keys and combinations of keys. These can be changed and saved to suit your preference; some useful key assignments are:

  • next - to move through all the SAS windows that are open.
  • recall - to bring back the most recently submitted set of programming code back into the Program Editor window (this does not work in any other window).
  • clear - to clear everything within the activated window (Program Editor, Log, or Output). This includes material not visible on the screen.
  • undo - to undo the last keystroke (e.g., undo the clear command if a window was inadvertently cleared).

For additional information on how to navigate through the SAS windows environment, new Windows users are referred to the tutorial titled "Getting Started with SAS Software" under the SAS Help menu, which is provided with the software. Getting started

Home NEXT
General Guidelines: File management

Contact: Charles Burchill       Telephone: (204) 789-3429
Manitoba Centre for Health Policy
Department of Community Health Sciences, University of Manitoba
4th floor Brodie Centre
408 - 727 McDermot Avenue
Winnipeg, Manitoba R3E 3P5       Fax: (204) 789-3910
Last modified on Monday, 12-Sep-2005 11:48:21 CDT