The following examples use a copy of the SASHELP.PRDSALE data set, which is a read-only data set in the SASHELP library. In this section, you will learn how to copy SASHELP.PRDSALE to the WORK library, so that you can use it with the other examples in this section.
Note | By default, files located in the WORK directory are deleted at the close of a SAS session. |
To copy the PRDSALE file in the SASHELP library to the WORK library, follow these steps:
Open the Explorer window by selecting from the menu.
Make sure you are in Tree view mode by enabling The Explorer window now contains two panels.
Display 19-1: Explorer Window Displaying Tree View
In the left panel, click the SASHELP library to show the library contents in the right panel. Scroll to the PRDSALE data set.
Right-click the PRDSALE data set and select Copy from the menu.
Display 19-2: Explorer Window Displaying Copy Menu Option
In the left panel, right-click WORK and select Paste .
Display 19-3: Explorer Window Displaying Paste Menu Option
Double-click Work and confirm that the data set was copied .
To quickly view the contents of your SAS data set, you can either
double-click a file in the SAS Explorer, or
open the VIEWTABLE window with the VT command, select then select the data set.
For this example, use the SAS data set WORK.PRDSALE, which contains sample data for product sales. The WORK.PRDSALE data set was created by copying PRDSALE from the SASUSER library in the previous example. See "Copying a Practice File to the WORK Data Library" on page 307.
Select to open the VIEWTABLE window.
Select The Open dialog box displays the current SAS libraries.
Under Libraries , select WORK . The data sets and views in the WORK library are displayed on the right.
Double-click PRDSALE. The VIEWTABLE window opens.
Display 19-5: Explorer Window Displaying Copied PRDSALE Data Set (Details View)
Scroll the VIEWTABLE window to view the WORK.PRDSALE data.
Display 19-6: VIEWTABLE Window Displaying PRDSALE Data
To save a copy of this file to use for practice in the next example, click The Save As dialog box opens.
Display 19-7: Data Table Save As Dialog Box
Select the WORK library as your storage location and type Mywork in the Member Name field.
Click .
To save a SAS data set as HTML, follow these steps:
Right-click the file in the SAS Explorer.
Select Save as HTML from the pop-up menu.
Select a location in the Save in box or leave it in the default location.
If you want to save the file with the default name of table-name.html , select Save .
If you do not want the default name, you can enter a file name and then select Save .
To copy a SAS data set to Microsoft Excel, you can right-click a file in the SAS Explorer and either
select Copy Contents to Clipboard and then click in Microsoft Excel, or
select View in Excel .