SAS for MS Windows98

  1. SAS may be launched by following these steps:
    bulletClick on the Start button
    bulletFind the Courseware Applications menu
    bulletFind the Statistical Apps menu
    bulletSelect SAS V8
  2. Use the Help menu or the F1 function key to obtain help on SAS.
  3. Three windows are available, one for editing SAS programs and two others for viewing log and output results from running those programs. Use the F3 function key to execute the code in the program editor window. You may also use the Submit icon or the Submit menu selection from the Locals menu.
    The log window will contain error messages and notes on the execution of that program while the output window will contain the results of executing the individual PROCs within that program.
  4. After you execute code in the program window, that window is cleared by SAS so that you can type and execute further code segments if you want. Use the F4 function key, to reclaim code that you just ran. You may also use the Recall Text menu selection from the Locals menu.
    Be careful, you may accidentally generate multiple copies of the program, combined into one, if you issue this command multiple times.
  5. SAS also provides several menus for your use. Usually, you click the left mouse button (LMB) to select an item from a menu, including the main menu bar at the top of the SAS screen. Sometimes, depending on how SAS is installed, you have to click the right mouse button (RMB) within one of the three types of windows to pop up a menu for manipulating the contents of that window. This is assumed in all descriptions below, but the menu may not need to be popped-up, depending on how your installation.
  6. For example, it is possible to cut and paste or delete portions of the window contents. First mark the appropriate portion of text. You can do this by dragging the mouse over the portion of text to mark while holding down the LMB or by moving the arrow keys while holding down the shift key. To delete the marked text, hit the delete key. To cut or paste the marked text, click the RMB to bring up the pop-up menu and then click with the LMB to select the Edit option and then the appropriate sub-menu item.
  7. To move around in any of the windows, use the arrow keys to move one position left and right and one line up and down, the Page Up and Page Down keys to move a whole page at a time, the left and right arrow keys together with the CTRL key to move left and right one word at a time, the Home and End keys to move to the beginning and end of the current line, and the Page Up and Page Down keys together with the CTRL key to move to the beginning and end of the window. For the log and output areas, you need to use Page Down or Page Up to change the page since the up and down arrow keys wrap around to the bottom and end of the current page for these windows. However, the up and down arrow keys will change the page within the program window. Use the Insert key to toggle between type-over and insert modes for data entry. You will notice that the cursor covers the whole current character position while in type-over mode and is a line at the front of the current character position in insert mode.
  8. To load, print, or save the contents of a window, click the RMB to bring up the pop-up menu and then click the LMB on the File option. Use the Open option to load a file into the window, the Print option to print out the contents, and the Save As option to save the contents to a file. Be careful if you use the Save option instead of the Save As option. The Save As option will always request a file name and so you can determine where it will be saved. The Save option will write to the current default file. However, the default file may be a temporary file and so you will lose it when you exit from SAS, or even worse it may be some other file that will accidentally be destroyed (hence the need for a backup).
  9. After you have coded and tested a program for one of the class assignments, first clear the log and output windows, if not already cleared, and then run your SAS program for printing out the results to turn into class. It is important to clear these areas before running them for printing purposes since the results of the execution of SAS code are merged together with the previous contents of these windows. After running the program, recall it, print out the contents of each of the three windows, and submit all these printouts in class on the due date.