create vlib.custord.view;
select ordernum stocknum shipto;
format ordernum 5.
stocknum 4.;
run;
proc print data=vlib.custord;
run;
When you want to use access descriptors and view descriptors, both types of descriptors
must be created before you can retrieve your DBMS data. The first step, creating the
access descriptor, enables SAS to store information about the specific DBMS table that
you want to query.
After you have created the access descriptor, the second step is to create one or more
view descriptors to retrieve some or all of the DBMS data described by the access
descriptor. In the view descriptor, you select variables and apply formats to manipulate
the data for viewing, printing, or storing in SAS. You use only the view descriptors, and
not the access descriptors, in your SAS programs.
The interface view engine enables you to reference your SAS view with a two-level SAS
name in a DATA or PROC step, such as the PROC PRINT step in the example.
See Chapter 29, “SAS Views,” on page 675 for more information about SAS views. See
the SAS/ACCESS documentation for your DBMS for more detailed information about
creating and using access descriptors and SAS/ACCESS views.
DBLOAD Procedure
The DBLOAD procedure enables you to create and load data into a DBMS table from a
SAS data set, data file, SAS view, or another DBMS table, or to append rows to an
existing table. It also enables you to submit non-query DBMS-specific SQL statements
to the DBMS from your SAS session.
Note: If a dynamic LIBNAME engine is available for your DBMS, it is recommended
that you use the SAS/ACCESS LIBNAME statement to create your DBMS data
instead of the DBLOAD procedure. However, DBLOAD continues to work in SAS
software if it was available for your DBMS in SAS 6. Some new SAS features, such
as long variable names, are not supported when you use the DBLOAD procedure.
The following example appends data from a previously created SAS data set named
INVDATA into a table in an ORACLE database named INVOICE:
proc dbload dbms=oracle data=invdata append;
user=smith;
password=secret;
path='myoracleserver';
table=invoice;
load;
run;
See the SAS/ACCESS documentation for your DBMS for more detailed information
about the DBLOAD procedure.
DBLOAD Procedure 713

Get SAS 9.4 Language Reference, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.