for Windows

 Using SAS for Windows

This document outlines how you get "up and running" in SAS Version 8 for Windows. It is assumed that you are familiar with the Windows 95/98/NT or 2000 environment. Anyone who has not been exposed to Windows (can there be such a person?) is advised to register for one of the introductory sessions offered by the Social Science Computing Lab or by ITS.

Invoking SAS

 Editing in SAS

All of the normal editing key sequences used in Windows can be used in SAS. Thus, for example, in the Program Editor window, Ctrl-X, Ctrl-C, and Ctrl-V are use for cutting, copying and pasting. The Windows clipboard is also available for copying information between SAS and any other Windows application. Those who prefer to use their mouse over the keyboard can also use the Menu Bar which conforms with the Windows standard. Two especially useful key sequences are Ctrl-E and F3. Ctrl-E will empty any window of its current contents. This is especially useful in the Program Editor when you want to start a fresh program, or in the output window when you don't want the output from several procedures to run-on. The F3 key is equivalent to the running figure button on the Tool Bar and is used to "run" your SAS program.

Although many people find the messages to be cryptic, you might find the Help button to be useful on occasion. I have found Help to be most useful for those situations where you know what you are doing but have forgotten the exact set of commands or available options.

Getting Help in SAS

There are many sources of help within the SAS system. Some of this may be accessed by clicking on "Help" on the SAS menu bar as illustrated below. If you are new to the SAS system, selecting "Getting Started with SAS Software" provides a short but useful tutorial.

Once you are familiar with SAS, the primary source of help is located under the "SAS System Help" selection.

UWO has not obtained a site license for the on-line tutorials, so most of the other selections are not fully operational.

A Sample Encounter

Once SAS is loaded, ensure that the Program Editor window is the active one by clicking on it. Enter the following lines:

TITLE 'My first SAS run';
OPTIONS ls=65;
DATA popstuff;
      INPUTcountry $ TFR CMR;

Albania   2.850  39.6
Bahamas   2.132  30.6
CzechRep  1.900  12.3
Ecuador   3.500  57.6
France   	1.780   9.3
Guyana   	2.643  62.0
Kenya   	5.350 102.4
Liberia   6.200 212.0
Libya   	6.390  83.4
Luxembog  1.650  10.7
Namibia   5.400  85.8
NewZelnd  2.120   9.3
Pakistan  5.600 135.5
SriLanka  2.480  21.6
Trinidad  2.750  18.2
Venezuel  3.600  39.2

PROC PRINT data=popstuff;

Now press F3 or click the Submit button (the running figure) on the Tool Bar. You should see your data printed in the Output window.

Clear (Ctrl-E) the Program Editor window and type the following lines.

PROC MEANS data=popstuff;
     VAR tfr crm;

Press F3 again. You should see more results in the output window.

Saving and Printing Stuff

Anything in that appears your windows can be saved in the same fashion you would save it in any other Windows application. For example, if you want to save your output, make the Output window the 'active' one (by clicking on it if necessary). Click on File, then click on Save As. Give the file a name (say, grades.out) and select the appropriate directory where you want it to reside. Since you are using a public terminal, it might be a good idea to bring your own diskette and put everything on your A: drive. Our programs in this class will be small so it will not normally be necessary to save anything on the hard drive.

Your program can also be saved by making the Program Editor window the active one and following a similar procedure. You might want to give your program a similar name (such as

Printing is similar to saving. Just click on File, then click on Print. Make sure you check to see which printer has been selected as the default so that you can find your output later.

Last modified: August 25, 2000