The ACCESS Procedure for Relational Databases |
The ACCESS procedure is
still supported for the database
systems and environments on which it was available in SAS 6. However, it is
no longer the recommended method for accessing relational DBMS data. It is
recommended that you access your DBMS data more directly, using the SAS/ACCESS LIBNAME
statement or the SQL pass-through facility.
Not all
SAS/ACCESS interfaces
support this feature. See features by host to determine whether this feature is available in
your environment.
The ACCESS procedure, along with the DBLOAD procedure
and an interface view engine, creates an interface between SAS and data in
other vendors' databases. You can use the ACCESS procedure to create and update descriptors.
The ACCESS procedure has several types of
statements:
-
Database connection statements are
used to connect to your DBMS. For details, see SAS/ACCESS documentation
for your DBMS.
-
Creating and updating statements
are CREATE statement and UPDATE
statement.
-
Table and editing statements include ASSIGN,
DROP, FORMAT,
LIST, QUIT,
RENAME, RESET,
SELECT, SUBSET,
TABLE, and
UNIQUE.
This table summarizes PROC ACCESS options and statements
that are required to accomplish common tasks.
Statement Sequence for Accomplishing Tasks with the ACCESS Procedure
Task |
Statements and Options
to Use |
Create an access descriptor |
PROC ACCESS statement-options;
|
CREATE libref.member-name.ACCESS;
database-connection-statements;
editing-statements;
|
|
|
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;
|
|
|
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;
|
|
|
Update an access descriptor |
PROC ACCESS statement-options;
|
UPDATE libref.member-name.ACCESS;
database-connection-statements;
editing-statements;
|
|
|
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;
|
|
|
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;
|
|
|
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;
|
|
|
Create a SAS data set from a view descriptor |
PROC ACCESS statement-options, including
DBMS=dbms-name; VIEWDESC=libref.member;
OUT=libref.member;
|
|
|
|
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.