Chapter Contents |
Previous |
Next |
SAS/ACCESS Software for PC File Formats: Reference |
ACCESS Procedure Reference describes the generic options and procedure statements that enable you to create access descriptors, view descriptors, and SAS data files from PC file format data. The following section describes the PC file-specific statements you use in the SAS/ACCESS interface to WKn data.
ACCESS Procedure Statements for WKn Files |
Database-description statements are only required when you create access descriptors. Because WKn information is stored in an access descriptor, you do not need to repeat this information when you create view descriptors.
The SAS/ACCESS interface to WKn uses the following procedure statements in batch mode:
PROC ACCESS DBMS=WK1|WK3|WK4;
|
RUN ; |
The QUIT statement is also available in PROC ACCESS. However, its use causes the procedure to terminate. QUIT is used most often in the interactive line and noninteractive modes to exit the procedure without exiting SAS.
The GETNAMES statement is optional. If you omit it, the default value GETNAMES=NO is used, and the WKn interface generates the SAS variable names VAR0, VAR1, VAR2, and so on. If you specify GETNAMES=YES, SAS variable names are generated from column names in the first row of the range. GETNAMES=YES also sets the default value of SKIPROWS statement to 1.
You can change the default value from NO to YES by setting the SS_NAMES environment variable. See Setting Environment Variables for more information on setting and changing environment variables.
The GETNAMES statement is a database-description statement, and it must follow the CREATE statement and precede any editing statements when you create a descriptor.
The MIXED statement is optional. You use it if you have both Lotus 1-2-3 numeric and character data in a column. Specifying YES allows both numeric and character data to be displayed as SAS character data. NO, the default, treats any data in a column that does not match the specified type as missing values.
You can change the default value to YES by setting the SS_MIXED environment variable. See Setting Environment Variables for more information on setting and changing environment variables.
The MIXED statement is an editing statement and must follow any database descriptions when you create an access descriptor.
The RANGE statement is optional. If you omit RANGE, the entire worksheet is accessed as the default range.
The RANGE is a database-description statement, and it must follow the CREATE statement and precede any editing statements when you create a descriptor.
The SCANTYPE statement is optional, and its default value is NO. If you specify YES, the ACCESS procedure scans the Lotus formats of all rows in each column of the range and uses the most common one to generate the default SAS format for each column. If you specify a number of rows, PROC ACCESS scans the specified number of rows only and returns the most common format.
If you specify the SKIPROWS statement, the ACCESS procedure skips the specified rows and starts scanning the 1-2-3 format from the next row. For example, if you specify SKIPROWS=3, PROC ACCESS skips the first three rows and begins scanning the format on the fourth row.
You can change the default value to YES by setting the SS_SCAN environment variable. See Setting Environment Variables for more information on setting and changing environment variables.
Specifying SCANTYPE=0 is equivalent to specifying SCANTYPE=NO.
The SCANTYPE statement is a database-description statement, and must follow the CREATE statement and precede any editing statements when you create a descriptor.
If GETNAMES=YES, the default value of SKIPROWS automatically changes to 1. The first row of data and formats after SKIPROWS in a range is used to generate the SAS variable types and formats. However, you can use the SCANTYPE statement to scan the formats of specified rows and use the most common type and format to generate the default SAS variable types and formats.
The SKIPROWS statement is a database-description statement, and it must follow the CREATE statement and precede any editing statements when you create a descriptor.
If you omit the TYPE statement, the database field types are generated from the PC file data types. You can change as many database field types as you want in one TYPE statement.
The WORKSHEET statement is optional. The WORKSHEET statement is a database-description statement and must follow the CREATE statement and precede any editing statements when you create an access descriptor.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.