The ACCESS Procedure for PC Files

Overview: ACCESS Procedure

Overview: ACCESS Procedure

This enables you to directly read, write, or extract PC files data into a SAS data set. The descriptor files are compatible with SAS 6. The ACCESS procedure can be used with Microsoft Excel (4, 5, 95), Lotus 1-2-3 (WK1, WK3, WK4), DBF, and DIF file formats.
CAUTION:
The ACCESS Procedure for PC Files is obsolete.
These procedures are generally not used anymore and are not supported. They are documented here for the sake of completeness. You are encouraged to rely on more recent functionality to produce similar results.
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.
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. To show and select the new column, you can recreate the descriptors.
The 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 to 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.