Chapter Contents

Previous

Next
SAS/ACCESS Software for PC File Formats: Reference

How the SAS/ACCESS Interface Works

The SAS/ACCESS interface to DIF files accesses data in spreadsheets and databases indirectly. Spreadsheet and database data must be translated into a DIF file format before it can be read by the SAS System. A DIF file is an ASCII text file with a file header section and a data section. DIF files, not spreadsheets or databases, are specified in the ACCESS and DBLOAD procedures. You use your software products' utilities to translate your spreadsheets and databases into DIF files. For example, you can use the Lotus 1-2-3 Translate Utility to translate a 1-2-3 worksheet or database to a DIF file. Once your spreadsheet or database is translated into a DIF file, the file is stored in a directory that you specify. You then enter this path and DIF filename with the PATH= statement in the ACCESS procedure.

If you change a spreadsheet or database file after translating the file to DIF format, re-translate the modified file and save it in a new DIF file. If you do not, the DIF file and SAS/ACCESS view based on the DIF file will not reflect your changes to the original.

The SAS/ACCESS interface to DIF files is read-only: it cannot be used to modify a DIF file.

To sort data in a DIF file, you must first extract the data into a data file. You can do this in one step with the SORT procedure's OUT= option. Or you can use the SQL procedure's SELECT statement with an ORDER BY clause.

The DBLOAD procedure translates a SAS data set into a DIF file format and stores the DIF file in the path specified by the PATH= statement. Software products such as Lotus 1-2-3 can then read data from the DIF file.

When you use a view descriptor to a DIF file in a DATA step or procedure, you provide a path to the DIF file. The DIF file interface view engine retrieves data from this file.


Chapter Contents

Previous

Next

Top of Page

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