INSTRUCTIONS FOR USING SAS/PC FOR WINDOWS SAS PROGRAMMING HANDOUT #1 SAS/PC for WINDOWS is available on the IBM machines in the Library computer lab and in the computer lab in Teachers College, and in the computer lab in Old Chemistry. Graduate students and faculty may also obtain an individual copy (good for 1 year) by contacting the UC Help Desk 556-3785 for approximately $100 or: software@uc.edu. SAS now offers a SAS Learning Edition ($125) that is good for 4 years that has very limited capabilities (see the SAS web page for more details: www.sas.com ) it contains a CD and a book. It does not allow for writing programs, bu just point and click. Select the SAS/PC/WINDOWS icon using the mouse. Once you start SAS/PC for WINDOWS you will see windows called EDITOR, LOG AND RESULTS. The EDITOR (WPGM) window is where you write you SAS program. You may also use the PROGRAM EDITOR (PGM) WINDOW. The following is a simple sample SAS program: DATA ONE; INPUT X Y @@; CARDS; 1 3 2 -4 7 12 ; PROC MEANS DATA=ONE; RUN; In order to SUBMIT your program you need to click on the SUBMIT icon at the top of window (or use the function key F8). After a short time your program will have run. The output will be printed in the OUTPUT window and any error messages will be printed in the LOG window together with information about the program. In order to see what is in each window you can use the appropriate function key (namely F6 for the LOG window, F7 for the OUTPUT window, and F5 for the PGM window). In order to see what each function key does hit function key F9, or type KEYS on the command line. In order to save your program on a diskette merely click on the SAVE icon and select the appropriate drive (:a) and type in a file name (use the .SAS suffix). This method can also be used to save the contents of the OUPUT or LOG windows. In order to include a previously written program from your diskette to the program editor window merely click on the OPEN icon and select the appropriate drive, file type, and file name. If you made a mistake in your program then go to the LOG and OUTPUT windows and type CLEAR on the command line (F11 will move the cursor to the command line). Then return to the WPGM (or PGM) window (using F5) and use the function key F4 to RECALL your program. Now you can edit the program and fix your mistakes. Again remember that errors are noted in the LOG window, so be sure to check the LOG window carefully to determine where your mistake might be. If you want to print off a paper copy of your program (or output) just go to the appropriate window and click on the PRINT icon and follow the instructions. A good technique is to include your output in the PGM window below your program and then print it off (this will save alot of paper!!!). You might also want to change the font and size of the print (this will fit more on one page). Go to PRINT SETUP, FONTS. If you need help with syntax for a particular SAS procedure merely click on the HELP icon and then click on SA S SYSTEM HELP, and then click on HELP ON SASS SOFTWARE PRODUCTS, then click on BASE (for PROC MEANS etc) or STAT (for PROC REG etc). Then click on INTRODUCTION or SYNTAX. FUNCTION KEYS: WINDOWS: F4 RECALL F5 WPGM WPGM This where you write the program (editor) F6 LOG LOG This is where errors are printed F7 OUTPUT OUTPUT This is where output is listed F8 SUBMIT F9 KEYS F11 COMMAND LINE PGM This is the program editor window (PGM) RESULTS This is where the output is broken up into parts New function keys can be created for each session, a very good one is: (You can also create new icons by clicking on the OPTIONS icon, and using TOOL EDITOR) F12 OUTPUT;CLEAR;LOG;CLEAR;PGM;RECALL; revised 12/15/2002