Section Progress
0% Complete

The SAS Microsoft Windows environment includes five primary components: 

  1. Explorer
  2. Enhanced Editor
  3. Log
  4. Output
  5. Results1

In this section we’ll walk you through what each of these components does. We recommend that you open up SAS on your computer, and try out the following exercises in the actual SAS interface after you’ve reviewed our examples. This will begin to familiarize you with how to navigate through the SAS interface.

Select the hotspots on the image below to discover what each component does.

Explorer window

The Explorer window allows you to explore your SAS files and libraries in the windowing environment. 

In the next section, we will provide more detail on SAS libraries. For now, it is sufficient to understand that SAS libraries are an essential feature for organizing and storing SAS files. The Explorer window allows you to navigate within the interface to different libraries to access your SAS files3

In the example presented below, move your cursor to the libraries icon on the left of your screen. Select libraries to see the active libraries in SAS. You can see that there are six active libraries: maps, mapsgfk, mapssas, sashelp, sasuser, and work. Select Maps to view the SAS files within the library. Within Maps, you can see that there are many different SAS data sets. Double click on Afghani2 to view the contents of this data set.

Enhanced Editor window

The Enhanced Editor window (or Editor window) allows you to write and edit your own SAS programs. The Editor window also assists you by colour coding the program to make it more readable. Once you have written a program, you can submit the program by clicking RUN at the top of the screen3

The process of writing and submitting a SAS program is illustrated in the example below. First, we write a few SAS statements in the Editor window. For now, don’t worry about the meaning of these commands. Then we move our cursor to the top of the screen and select the RUN icon (represented by a person running). All of the SAS code in the Editor window is then executed. If you wish to only run a particular command, you can highlight the command of interest with your cursor and then select the RUN command.

Log window

The Log window provides you with feedback about your SAS session and program. For instance, when SAS is first opened, the Log window displays a number of messages, including information on how long it took for SAS to initialize.

The three types of messages that the log file displays are notes, warnings, and errors. Notes are written in blue, warnings in green, and errors in red. Below, we can see that the log file includes multiple notes. It also includes one error message and one warning message3. Again, for now don’t worry about what these specific messages mean, but be aware that this is where the messages are displayed. 

The log file is extremely important. It is SAS’s way of communicating with you. It is helpful for debugging your program and checking your work. You may also write messages to yourself in the log file or display results for future reference.

Log window

click to view larger

Output window

The Output window displays the listing output of your SAS program. Listing output is an older type of output used by SAS. SAS now uses html by default. When you run a program that generates results, a new window will pop up entitled Results Viewer. This window displays the html results of your program. For the moment, you can focus your attention on the Results Viewer window and ignore the Output window3

Looking at the example below, we can see that after running a program, a new window pops up next to the Editor window. If we click on the Results Viewer window, we can see the results of our program displayed in html format. The image below shows the same results output in a listing format. As you can see, these results are displayed in the Output window located to the left of the Log window. 

Results Viewer window

The Results Viewer window organizes the results of your program and facilitates the exploration of these results.

When SAS is open, the Results Viewer window is hidden behind the Explorer window. The window is automatically moved to the front once a program generates output. We can then select the result of interest in the Results Viewer window. This opens the Results Viewer window and displays the results in html format. 

Examining the example below, we can see that there are results for two commands from SAS: CONTENTS and FREQ. If we click on the + (plus sign) for these results, we can see the tables available for viewing. Under PROC FREQ, we can see three available tables: age, male, and year_of_birth. If we click on the age table and click on the One-Way Frequencies html file, the Results Viewer window will open and we can explore these results.