Chapter Contents

Previous

Next
SAS/ACCESS Software for PC File Formats: Reference

ACCESS Procedure Syntax

PROC ACCESS options;

Create and Update Statements
CREATE libref.member-name.ACCESS|VIEW ;
UPDATE libref.member-name.ACCESS|VIEW ;

Database-Description Statement
PATH= 'path-and-filename<.PC-filename-extension>' | <'>filename<'> | fileref;

Editing Statements
ASSIGN<=>YES|NO|Y|N;
DROP <'>column-identifier-1<'>
<<'>...column-identifier-n<'>>;
FORMAT <'>column-identifier-1<'><=>SAS-format-name-1<'> <...<'>column-identifier-n<'><=>SAS-format-name-n>;
LIST <ALL|VIEW|<'>column-identifier<'>>;
QUIT;
RENAME <'>column-identifier-1<'><=>SAS-variable-name-1
<...<'>column-identifier-n<'><=>SAS-variable-name-n>;
RESETALL | <'>column-identifier-1<'><...<'>column-identifier-n<'>>;
SELECT ALL|<'>column-identifier-1<'>
<...<'>column-identifier-n<'>>;
SUBSET selection-criteria;
UNIQUE<=>YES|NO|Y|N ;
RUN;

The file-specific statements for your PC files might differ from those listed above. See your PC file format chapter for your file's statements.


Description

Use the ACCESS procedure to create access descriptors, view descriptors, and SAS data files. Descriptor files describe PC file data so that you can directly read, update, or extract the PC file data from within a SAS program. The following sections explain the statements and options that might appear in a PROC ACCESS procedure.


PROC ACCESS Statement Options

The syntax of the ACCESS procedure statement is

PROC ACCESS options;

The PROC ACCESS statement options available with all supported PC file formats are described below. Other options, specific to particular PC file formats, are described in the DBMS-specific chapters.

DBMS=pc-file-format
specifies which PC database product or spreadsheet system you want to access from SAS. This is the only required option. The valid types are DBF, DIF, WK1, WK3, WK4, and XLS.

ACCDESC=libref.access-descriptor <(READ|WRITE|ALTER=password)>
specifies an existing access descriptor.

Use this option when creating or updating a view descriptor based on an access descriptor that was created in a separate PROC ACCESS step.

You name the view descriptor in the CREATE statement. You can also use a SAS data set option on the ACCDESC= option to specify a SAS password for the access descriptor.

The ACCDESC= option has two aliases: AD= and ACCESS=.

VIEWDESC=libref.view-descriptor
specifies a view descriptor as input for the OUT= option. (See the description of OUT=.)

OUT= <libref.>member-name
specifies a SAS data file. When VIEWDESC= and OUT= are used together, you can write data accessed from the view descriptor to the SAS data set specified in OUT=. For example:
proc access viewdesc=vlib.invq4
            out=dlib.invq4;
run;

CAUTION:
Altering a PC file might invalidate defined descriptors. Altering the format of a PC file that has descriptor files defined on it might cause these descriptors to be out-of-date or invalid. For example, if you add a column to a file and an existing access descriptor is defined on that file, the access descriptor and any view descriptors based on it do not show the new column. You must re-create the descriptors to be able to show and select the new column.  [cautionend]


Chapter Contents

Previous

Next

Top of Page

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