Chapter Contents

Previous

Next
SAS/ACCESS Software for PC File Formats: Reference

Setting Environment Variables

You can change the default behavior of the SAS/ACCESS interface by setting environment variables in your SAS configuration file. You can set three SAS/ACCESS environment variables: SS_MIXED, SS_NAMES, and SS_SCAN. Setting these variables in your SAS configuration file changes how the interface works by default .

The configuration file omits the following environment variables. When the environment variables are omitted, the default value for them is NO.

SS_MIXED YES | NO
YES allows both Microsoft Excel numeric and character data in a column to be displayed as SAS character data. The Microsoft Excel numeric data are converted to their character representation when their corresponding SAS variable type is defined as character.

NO does not convert Microsoft Excel numeric data in a column into SAS character data. Microsoft Excel numeric data are read in as SAS missing values when their corresponding SAS variable type is defined as character. NO is the default.

Setting the SS_MIXED environment variable changes the default value of the MIXED statement in PROC ACCESS.

SS_NAMES YES | NO
YES in PROC ACCESS generates SAS variable names from column names in the first row of the worksheet or the specified range of the worksheet and reads data from the second row. YES in PROC DBLOAD writes column names using SAS variable names or SAS variable labels to the first row of the new XLS file, reads data from the data set, and writes them to the XLS file beginning with the second row.

NO in PROC ACCESS generates the SAS variable names VAR0, VAR1, VAR2, and so on, and reads data from the first row of the worksheet or specified range. NO in PROC DBLOAD reads the data from the data set and writes them to the XLS file beginning with the first row. NO is the default.

Setting the SS_NAMES environment variable changes the default value of the GETNAMES statement in PROC ACCESS and the PUTNAMES statement in PROC DBLOAD.

SS_SCAN YES | NO | number-of-rows
YES scans the data type and format of rows in a worksheet or specified range after skipping the number of rows specified in the SKIPROWS statement. SS_SCAN finds the most common Microsoft Excel data type and format in order to generate the default SAS data type and format. If a number of rows is specified, SAS/ACCESS software scans only the data type and format from these rows.

NO uses the type and format of the first row in a worksheet or specified range after skipping the number of rows specified in SKIPROWS to generate the default SAS data type and format. NO is the default.

Number-of-rows scans the type and format of the specified number of rows only. Setting the number of rows is more efficient because data are read only from the specified number of rows rather than from the entire file.

Setting the SS_SCAN environment variable changes the default value of the SCANTYPE statement in PROC ACCESS.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.