Chapter Contents

Previous

Next
SAS/ACCESS Software for Relational Databases: Reference

Procedure Statements

To invoke the ACCESS procedure, you use the options described in Options and certain procedure statements. The options and statements that you choose are determined by your task, as summarized in Options and Statements Required for the ACCESS Procedure. These statements vary per DBMS and might be optional; see your DBMS chapter for more information. The new SAS/ACCESS data set options that are described in SAS/ACCESS Data Set Options are available for use with view descriptors, where applicable.

Options and Statements Required for the ACCESS Procedure
Tasks Options and Statements You Use
create an access descriptor

PROC ACCESS statement-options;
CREATE libref.member-name.ACCESS;
database-connection-statements;
editing-statements;
RUN;

create an access descriptor and a view descriptor

PROC ACCESS statement-options;
CREATE libref.member-name.ACCESS;
database-connection-statements;
editing-statements;
CREATE libref.member-name.VIEW;
SELECT column-list;
editing-statements;
RUN;

create a view descriptor from an existing access descriptor

PROC ACCESS statement-options, including ACCDESC=libref.access-descriptor;
CREATE libref.member-name.VIEW;
SELECT column-list;
editing-statements;
RUN;

update an access descriptor

PROC ACCESSstatement-options;
UPDATE libref.member-name.ACCESS;
database-connection-statements;
editing-statements;
RUN;

update an access descriptor and a view descriptor

PROC ACCESS statement-options;
UPDATE libref.member-name.ACCESS;
database-connection-statements;
editing-statements;
UPDATE libref.member-name.VIEW;
editing-statements;
RUN;

update an access descriptor and create a view descriptor

PROC ACCESS statement-options;
UPDATE libref.member-name.ACCESS;
database-connection-statements;
editing-statements;
CREATE libref.member-name.VIEW;
SELECT column-list;
editing-statements;
RUN;

update a view descriptor from an existing access descriptor

PROC ACCESS statement-options, including ACCDESC=libref.access-descriptor;
UPDATE libref.member-name.VIEW;
editing-statements;
RUN;

create a SAS data set from a view descriptor

PROC ACCESS statement-options, including DBMS=dbms-name; VIEWDESC=libref.member; OUT=libref.member;
RUN;


To review the contents of an existing view descriptor, you can use the CONTENTS procedure. For an example, see Reviewing Variables.

To review the contents of an access descriptor, you can use the LIST statement in PROC ACCESS. In this Oracle Rdb example, the LIST statement displays all of the variables in the newly created access descriptor, ADLIB.EMPLOY.

   /* create access descriptor  */

proc access dbms=rdb;
   create adlib.employ.access;     
   database='qa:[dubois]textile';
   table=employees;
   assign=no;
   list all;

 

You can create or update one or more access descriptors and view descriptors in one execution of PROC ACCESS, or you can create or update the descriptors in separate executions.

To create descriptors, the procedure statements must be coded in a particular order. See CREATE for information on this order and for information on database connection and editing statements. The PROC ACCESS statements are described in alphabetic order in the following sections.


Chapter Contents

Previous

Next

Top of Page

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