SAS/ACCESS Software for PC File Formats: Reference |
The SAS/ACCESS interface
accesses data in the Lotus 1-2-3 WKn files directly. It enables you to create SAS data sets from
WKn files or directly read the WKn file data without creating SAS data sets. The interface
does not allow you to update, add, or delete data in WKn
files.
To access the data, the interface accesses a
range in a worksheet
as a table. If the range is not specified, the interface accesses the entire
worksheet as a table. By default, the interface uses the Lotus 1-2-3 formats
of columns in the first row of the range to determine the formats of variables
in SAS/ACCESS descriptors.
However, you can manipulate where the interface begins
to read data and what format the interface generates by using the SKIPROWS
and SCANTYPE statements in the ACCESS procedure. SKIPROWS skips a specified
number of rows before reading data. SCANTYPE finds the most common data type
from among a specified number of rows within a WKn
range (after skipping the number of rows specified in SKIPROWS) and uses it
to generate the default format for SAS variables.
The ACCESS procedure enables you to create access descriptors
and view descriptors for WKn files. You then
can use the view descriptors as SAS data sets.
You can retrieve a subset of data using the WHERE statement
.
To
sort WKn file data, you must first extract the
data from a WKn file and place them in a SAS
data file, unless you are using the SQL procedure. (The SQL procedure enables
you to present output data in a sorted order using the ORDER BY clause of
the SELECT statement.) You can extract and sort WKn
file data in one step with the OUT= option in the SORT procedure, using a
view to the WKn file as input to PROC SORT.
|
Creating and Loading the Data |
When
you use PROC DBLOAD to create and load WKn files,
the procedure translates the SAS data set into a WKn
file. The file is stored in the location specified by the PATH= statement.
Only one SAS data set can be loaded into a WKn
file at one time. The loaded WKn file can contain
only one worksheet. Lotus 1-2-3 then reads data from the loaded WKn file directly.
In the DBLOAD procedure, you can specify the PUTNAMES
statement to place the SAS variable names in the first row of the spreadsheet
and the first observation in the second row, and so on. If PUTNAMES is not
specified, the first observation is placed in the first row, the second observation
is placed in the second row, and so on. Columns do not have names. The formats
for SAS variables are automatically converted to the corresponding Lotus 1-2-3
types and formats. See the descriptions of individual statements for more
information on how the data and columns are read.
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.