Reading and Writing Data |
A SAS data set can be opened as a client data set if it is accessible by the PC operating system of the computer running Stat Studio. A data set on a USB flash drive, hard drive, CD drive, or DVD drive can be opened as a client data set. So, too, can a data set on a networked PC or a UNIX data set that is accessible through a mounted networked drive. For example, the following can be opened as client data sets:
A SAS data set is a server data set if it is in a SAS library such as WORK, SASUSER, or SASHELP, or in a libref that you defined by using the LIBNAME statement. For example, the following are server data sets:
To use the GUI to open a SAS data set on the client:
Figure 2.1: Opening a Client Data Set
A data table appears, showing a tabular view of the data. Connected to the data table (although invisible) is an underlying DataObject that was created from the SAS data set. The DataObject holds the data in memory; the data table displays a view of the data.
Note: Clicking Go to Personal Files directory navigates to your personal files directory. By default, the personal files directory corresponds to the Windows directory shown in Table 2.1.
Table 2.1: The Personal Files DirectoryWindows XP | C:\Documents and Settings\userid\My Documents\ |
My Stat Studio Files | |
Windows Vista | C:\Users\userid\Documents\My Stat Studio Files |
To use the GUI to open a SAS data set in a library on the server:
Figure 2.2: Opening a Server Data Set
A data table appears, showing a tabular view of the data. There is a
DataObject (not visible, but still present) connected to the
data table.
Note: Figure 2.2 shows librefs that are not predefined. If your PC is your SAS server, you can create an AutoExec.sas file in the C:\ root directory that contains LIBNAME statements that define librefs on your PC. Everytime a SAS server starts, SAS executes the AutoExec.sas file automatically. If you are running a SAS server on another computer, ask your site administrator to set up librefs for you.
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.