Chapter Contents


SAS/ACCESS Software for PC File Formats: Reference

DBLOAD Procedure: WKn Specifics

DBLOAD Procedure Reference describes the generic options and procedure statements that enable you to create a PC file table and to insert data in it. The following section describes the file-specific statement you use in the SAS/ACCESS interface to WKn.

DBLOAD Procedure Statements for WKn Files

To create and load a WKn table, the SAS/ACCESS interface to WKn uses the following statements in batch mode:

<DATA= <libref.>SAS-data-set>;
PATH='path-and-filename<.WK1|.WK3|.WK4>' | <'>filename<'> | fileref;
PUTNAMES <=> YES | NO | Y | N;
ACCDESC= <libref.>access-descriptor;
DELETE variable-identifier-1 <...variable-identifier-n>;
ERRLIMIT= error-limit;
FORMAT SAS-variable-name-1 SAS-format-1 <=>
<...SAS-variable-name-n SAS-format-n>;
LIMIT= load-limit ;
LIST <ALL | COLUMNS | FIELDS | variable-identifier>;
RENAME variable-identifier-1 <=> <'>column-name-1<'>
<...variable-identifier-n = <'>column-name-n<'>>;
RESET ALL | variable-identifier-1 <...variable-identifier-n>;
<...column-identifier-n <=> C | N>;
WHERE SAS-where-expression;

The QUIT statement is also available in PROC DBLOAD. 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.

PUTNAMES <=> YES | NO | Y | N;
writes column names to the first row of the new WKn file. The column names can be default SAS variable names or, if you specify the LABEL statement, SAS variable labels. You can modify the column names using the RENAME statement.

The PUTNAMES statement is optional. If you omit PUTNAMES, data are read from the data set and written to the WKn file beginning in the first row of the WKn file, and no column names are written to the file.

You can change the default value to YES by setting the SS_NAMES environment variable. See Setting Environment Variables for more information on setting and changing environment variables.

FORMAT SAS-variable-name-1 SAS-format-1 <SAS-variable-name-n SAS-format-n>;
assigns a temporary format to a SAS variable in the input SAS data set. This format temporarily overrides any other format for the variable. The assignment lasts only for the duration of the procedure. Assign formats to as many variables as you want in one FORMAT statement.

Use FORMAT when you want to change the format, column width, or the number of decimal digits for columns being loaded into the PC file. For example, if you change the SAS variable format 12.1 to DOLLAR15.2, the column format of the loaded data changes from a fixed numeric format with a column width of 12 and one decimal digit to a currency format with a column width of 15 and two decimal digits.

Chapter Contents



Top of Page

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