Main Windows in the SAS Windowing Environment

Overview of SAS Windows

SAS windows have several features that operate in a similar manner across all operating environments: menus, toolbars, and online Help. You can customize many features of the SAS windowing environment, including toolbars, icons, menus, and so on.
The five main windows in the SAS windowing environment are the Explorer, Results, Program Editor, Log, and Output windows.
Note: The arrangement of your SAS windows depends on your operating environment. For example, in the Microsoft Windows operating environment, the Enhanced Editor window appears instead of the Program Editor.
When you first invoke SAS, the Program Editor, Log, Output, and Explorer windows display. When you execute a SAS program, the default output (HTML) displays in the Results window. If you use a PUT statement in your program, then output is written to the SAS Log by default.
Note: The Microsoft Windows operating environment was used to create the examples in this section. Menus and toolbars in other operating environments have a similar appearance and behavior.
Windows Specifics: If you are using Microsoft Windows, the active window determines which items are available on the main menu bar.
The following display shows one example of the arrangement of SAS windows. The Explorer window shows active libraries.
Windows in the SAS Windowing Environment
Windows in the SAS Windowing Environment

SAS Explorer Window

Uses of the SAS Explorer Window

The Explorer window enables you to manage your files in the windowing environment. You can use the SAS Explorer to perform the following tasks:
  • View lists of your SAS files.
  • Create new SAS files.
  • View, add, or delete libraries.
  • Create shortcuts to external files.
  • Open any SAS file and view its contents.
  • Move, copy, and delete files.
  • Open related windows, such as the New Library window.

Open the SAS Explorer Window

You can open SAS Explorer in the following ways:
Command:
Enter EXPLORER in the command line and press Enter.
Menu:
Select Viewthen selectExplorer.

Display SAS Explorer with and without a Tree View

You can display the Explorer window with or without a tree view of its contents. Displaying the Explorer with a tree view enables you to view the hierarchy of the files. To display the tree view, select Show Tree from the View menu. To turn tree view off, deselect Show Tree in the menu.
Note: You can resize the Explorer window by dragging an edge or a corner of the window. You can resize the left and right panes of the Explorer window by clicking the split bar between the two panes and dragging it to the right or left.

Program Editor Window

Uses of the Program Editor Window

The Program Editor window enables you to enter, edit, submit, and save SAS programs.

Open the Program Editor Window

You can open the Program Editor window in the following ways:
Command:
Enter PROGRAM or PGM in the command line and press Enter.
Menu:
Select Viewthen selectProgram Editor.
Note: To open your SAS programs in the SAS windowing environment, you can drag and drop them onto the Program Editor window.

View a Program in the Program Editor Window

The following example shows a SAS program in the Program Editor window:
Example of the Program Editor Window
Example of the Program Editor Window

Log Window

Uses of the Log Window

The Log window enables you to view messages about your SAS session and your SAS programs. If the program that you submit has unexpected results, then the log helps you to identify the error. You can also use a PUT statement to write program output to the Log.
Note: To keep the lines of your log from wrapping when your window is maximized, use the LINESIZE= system option.

Open the Log Window

You can open the Log window in the following ways:
Command:
Enter LOG in the command line and press Enter.
Menu:
Select Viewthen selectLog.

View Log Output

The following is an example of Log output.
Example of Output in the Log Window
Example of Output in the Log Window

Results Window

Uses of the Results Window

The Results window enables you to view HTML output from a SAS program. HTML is the default output type, and HTMLBlue is the default output style. The Results window uses a tree structure to list various types of output that might be available after you run SAS. You can view, save, or print individual files. The Results window is empty until you execute a SAS program and produce output. When you submit a SAS program, the output is displayed in the Results Viewer and the file is listed in the Results window.

Open the Results Window

You can open the Results window in the following ways:
Command:
Enter ODSRESULTS in the command line and press Enter.
Menu:
Select Viewthen selectResults.

View Output in the Results Window

The left pane of the following display shows the Results window, and the right pane shows the Results Viewer where the default HTML output is displayed. The Results window lists the files that were created when the SAS program executed.
Results Window and Results Viewer
Results Window and Results Viewer

Output Window

Uses of the Output Window

The Output window enables you to view LISTING output from your SAS programs. By default, the Output window is positioned behind the other windows. When you create LISTING output, the Output window automatically moves to the front of your display.
Note: To keep the lines of your output from wrapping when your window is maximized, use the LINESIZE= system option.

Open the Output Window

You can open the Output window in the following ways:
Command:
  • Enter OUTPUT or OUT in the command line and press Enter.
  • Enter LISTING or LST in the command line and press Enter.
Menu:
Select Viewthen selectOutput.

Create and View Listing Output

Because LISTING output is not the default output type, you must use ODS statements to open the listing destination. Along with LISTING output, HTML output is also generated. The following example shows a program that produces LISTING output. There is an ODS statement before the DATA statement and after the RUN statement:
Example of a Program That Produces Listing Output
Example of a Program that Produces Listing Output
Example of Listing Output in the Output Window
Example of Listing Output in the Output Window

Using the Preferences Dialog Box to Select Output Types

You can use the Preferences dialog box to select output types and set system preferences. Each tab in the Preferences dialog box holds a related group of items. To access the Preferences dialog box, select Toolsthen selectOptionsthen selectPreferences.
The following is an example of the Preferences dialog box, with the Results tab selected:
Example of the Preferences Dialog Box
Example of the Preferences Dialog Box
Several default values are selected in the Results tab. Under HTML, Create HTML is the default output type, and HTMLBlue is the default output style. Use ODS Graphics is also selected by default. When the Use ODS Graphics box is checked, you are able to automatically generate graphs when running procedures that support ODS graphics. Checking or unchecking this box enables you to turn on or turn off ODS graphics when you invoke SAS.
To produce LISTING output, check the Create Listing box under Listing. If you deselect Create HTML and leave the Create Listing box checked, your program produces listing output only.