Previous Page | Next Page

The ACCESS Procedure for PC Files

Overview: ACCESS Procedure

The ACCESS Procedure (Microsoft Windows operating environments) creates descriptor files that describe data in PC files to SAS. This enables you to directly read, update, or extract PC files data into a SAS data set. The ACCESS procedure can be used with Microsoft Excel (4, 5, 95), Lotus 1-2-3 (WK1, WK3, WK4), DBF, and DIF file formats.

The ACCESS procedure enables you create access descriptors, view descriptors, and SAS data files. Descriptor files describe PC files data to enable you to directly read, update, or extract PC files data while working within a SAS program

See: The SAS/ACCESS Descriptors for PC Files.

CAUTION:
Altering a PC file might invalidate defined descriptors.

Altering the format of a PC file that has descriptor files defined for it might cause the descriptors to be out-of-date or invalid. If you add a column to a file and an existing access descriptor is defined for that file, the existing access descriptor and view descriptors do not show the new column. Re-create the descriptors to be able to show and select the new column.  [cautionend]

The descriptor files are compatible with SAS 6. The view descriptor saves a column name with up to eight characters in uppercase. Any column name longer than eight characters is truncated. When duplicate names occur after truncation, a unique name is generated with a number appended to it. The view descriptor saves full column names as is in the label fields. Full column names are read from the SAS data set variable labels.


Using ACCESS Procedure Statements

The following table presents a task-oriented overview of the ACCESS Procedure statements. The statements enable you to create or modify access and view descriptors. See ACCESS Procedure Syntax for the complete syntax for this procedure.

ACCESS Procedure Options and Statements
Task Options and Statements That You Use
create an access descriptor

PROC ACCESS DBMS=DBF|DIF|WKn|XLS;
CREATE libref.member-name.ACCESS;
required-database-description-statements;
optional-editing-statements;
RUN;
create an access descriptor and a view descriptor

PROC ACCESS DBMS=DBF|DIF|WKn| XLS;
CREATE libref.member-name.ACCESS;
required-database-description-statements;
optional-editing-statements;

CREATE libref.member-name.VIEW;
SELECT column-list;
optional-editing-statements;
RUN;

create a view descriptor from an existing access descriptor

PROC ACCESS DBMS=DBF|DIF|WKn|XLS
ACCDESC=libref.access-descriptor;
CREATE libref.member-name.VIEW;
SELECT column-list;
optional-editing-statements;
RUN;

As the table indicates, you can create one or more access descriptors and view descriptors in one execution of PROC ACCESS, or you can create the descriptors in separate executions. See CREATE Statement for additional information about statement order.

Previous Page | Next Page | Top of Page