1. Introduction

1.1  windows

The SAS consists of three windows, called the LOG, OUT, and PROGRAM EDITOR window. The PROGRAM EDITOR contains the SAS programming statements and data that you enter. If you execute parts or all of the contents of the PROGRAM EDITOR, SAS compiles your program and writes the results of execution to the LOG window. If the program produces output, it will be written to the OUT window.
Caution: After each execution of SAS statements, you should browse the LOG window for errors. Only if there are no errors, the contents of the OUT window should be trusted.

 

1.2. Executing a program

After you write down your program to the PROGRAM EDITOR, to get output you need to execute that program. A program is part or all of the PROGRAM EDITOR that consists of executable statements and/or data. There are two ways to execute a program.

a) Highlight the section you wish to execute. Then submit the highlighted section.
b) Simply submit the whole contents of the PROGRAM EDITOR (PROG).

To submit you can either
a) hit the submit button on the menu bar(the little running guy)

b) choose Run-Submit from the menu
c) type submit in the command box ( the dialogue box below the menu bar)

 

1.3. Saving your work

You can of course save the contents of any of the three main windows by selecting File-Save or File-Save As.. from the menu. The Save command always applies to the currently active window.

Much damage can be done by not carefully observing which window is being saved.

 

    1. Basic rules

 

1.5 About SAS programs

SAS programs have two major building blocks: a DATA step, and a PROC step.

DATA step: reads data and prepares (modifies) it for use by subsequent steps.

PROC step: collection of statements that execute a certain task (e.g. regression, ANOVA)