Examples in this section show how to use the
LIBNAME statement to associate librefs with DBMS objects such as tables and
views. The LIBNAME statement is the recommended method for accessing
DBMS data from within SAS.
These examples work
with all
SAS/ACCESS relational interfaces. However, you might need
to make some adjustments for some interfaces, such as using different
or additional information. For interface-specific details, see the
comments within the sample code and also check for related SAS notes,
which are available at
http://support.sas.com/notes
.
Follow these steps to
run the examples.
-
Modify and submit the
ACCAUTO.SAS file, which creates the appropriate LIBNAME statements
for each database.
-
Submit the ACCDATA.sas
program to create the DBMS tables and SAS data sets that the sample
code uses.
-
Submit the ACCRUN.sas
program to run the samples.
These programs are available
in the SAS Sample Library. If you cannot locate this library, contact
your SAS support consultant.
For
information about the tables that are in sample code, see Descriptions of the Sample Data.
Note: Before you rerun an example
that
updates DBMS data,
resubmit the ACCDATA.sas program to re-create the DBMS tables.