If you are not familiar with SAS or with writing code in the SAS language, then you
might find the windowing environment helpful. With the windowing environment, you
can open a data set, point to rows and columns in your data. Then, you can click menu
items to reorganize and perform analyses on the information.
For more information about the SAS windowing environment, select SAS Help and
Documentation from the Help menu after you invoke a SAS session.
Managing Data with SAS Explorer
Introduction to Managing Data with SAS Explorer
You can use SAS Explorer to view and manage data sets. Data sets are stored in
libraries, which are storage locations for SAS files and catalogs. By default, SAS defines
several libraries for you:
is a library created by SAS that stores the text for Help windows, default function-
key definitions, window definitions, and menus.
is a library created by SAS that presents graphical representations of geographical or
other areas.
is a permanent SAS library that is created at the beginning of your first SAS session.
This library contains a Profile catalog that stores the customized features or settings
that you specify for SAS. (You can store other SAS files in this library.)
is a library that is created by SAS at the beginning of each SAS session or SAS job.
Unless you have specified a User library, any newly created SAS file with a one-
level name is placed in the Work library by default. The newly created file is deleted
at the end of the current session or job.
Viewing Libraries and Data Sets
Libraries and data sets are represented in SAS by large icons, small icons, or as a list.
With the Explorer window active, you can change this representation by selecting an
option from the View menu:
To view large icons, select Large Icons from the View menu.
To view small icons, select Small Icons from the View menu.
To view data sets in a list, select List from the View menu.
356 Chapter 17 Managing Your Data in the SAS Windowing Environment
The following example uses large icons to show the contents of Sashelp:
Display 17.1 Sashelp Library Represented by Large Icons
If you select the Sashelp library and then select View ð Details from the menu bar, the
contents of the Sashelp library is displayed, along with the size and type of the data sets:
Display 17.2 Detailed View of the Sashelp Library
If you double-click a table in this list, the data set opens. The VIEWTABLE window,
which is a SAS table viewer and editor, appears and is populated with the data from the
Managing Data with SAS Explorer 357
Assign File Shortcuts
A file shortcut is also known as a file reference or fileref. Filerefs save you programming
time by enabling you to assign a nickname to a commonly used file. You can use the
FILENAME statement to create a fileref, or you can use the File Shortcut Assignment
window from SAS Explorer.
To assign a fileref to a file, follow these steps:
1. Select Tools ð New File Shortcut from the menu.
2. In the File Shortcut Assignment window that appears, enter the name of the fileref
that you want to use in the Name field.
3. Enter the full pathname for the file in the File field.
The following display shows the File Shortcut Assignment window:
By default, filerefs that you create are temporary and can be used in the current SAS
session only. Selecting
Enable at Startup from the File Shortcut Assignment window,
however, assigns the fileref to the file whenever you start a new SAS session.
Rename a SAS Data Set
You can rename any data set in a SAS library as long as it is not Write protected. To
rename a data set, follow these steps:
1. Open SAS Explorer and select a library.
The contents of the library appear in the right pane.
2. Right-click the data set that you want to rename.
3. Select Rename from the menu, and enter the new name of the data set.
358 Chapter 17 Managing Your Data in the SAS Windowing Environment

Get SAS 9.4 Language Reference, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.