Chapter Contents


SAS/ACCESS Software for PC File Formats: Reference

DBLOAD Procedure: DIF Specifics

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

DBLOAD Procedure Statements for DIF Files

To create and load a DIF table, the SAS/ACCESS interface to PC file formats uses the following statements.

Note:   The SAS/ACCESS interface to DIF files does not use the TYPE statement described in DBLOAD Procedure Reference.  [cautionend]

PROC DBLOAD DBMS=DIF <DATA=<libref.>SAS-data-set>;
PATH='path-and-filename<.DIF>' | <'>filename<'>| fileref;
DELETE variable-identifier-1 <...variable-identifier-n>;
FORMAT SAS-variable-name-1 SAS-format-1 <...SAS-variable-name-n SAS-format-n>;
LIST <ALL | COLUMNS | FIELDS | variable-identifier>;
RENAME variable-identifier-1= <'>column-name-1<'>
RESET ALL | variable-identifier-1 <...variable-identifier-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.

writes column labels to the first row of the new DIF file and follows the column labels with a blank row. The column labels can be default SAS variable names or, if you specify the LABEL statement, SAS labels. You can modify the column labels using the RENAME statement.

If this statement is omitted, data are read from the data set and written to the DIF file beginning in the first row of the DIF file, and no column labels are written to the file.

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.

The following example creates a new DIF table, EXCHANGE.DIF, from the data file DLIB.RATEOFEX. An access descriptor ADLIB.EXCHANGE is also created, based on the new DIF table. You must be granted the appropriate privileges in order to create new DIF files.

libname difdliba 'SAS-data-library';
libname diflibv 'SAS-data-library';

proc dbload dbms=dif data=dlib.rateofex;;
   rename fgnindol=fgnindolar 4=dolrsinfgn;

Chapter Contents



Top of Page

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