DBLOAD Procedure

Overview: DBLOAD Procedure

Sending Data from SAS to a DBMS

The DBLOAD 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 sending data from SAS to a DBMS. 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.

Properties of the DBLOAD Procedure

Along with the ACCESS procedure and an interface view engine, the DBLOAD procedure creates an interface between SAS and data in other vendors' databases.
The DBLOAD procedure enables you to create and load a DBMS table, append rows to an existing table, and submit non-query DBMS-specific SQL statements to the DBMS for processing. The procedure constructs DBMS-specific SQL statements to create and load, or append, to a DBMS table by using one of these items:
  • a SAS data file
  • an SQL view or DATA step view
  • a view descriptor that was created with the SAS/ACCESS interface to your DBMS or with another SAS/ACCESS interface product
  • another DBMS table referenced by a SAS libref that was created with the SAS/ACCESS LIBNAME statement.
The DBLOAD procedure associates each SAS variable with a DBMS column and assigns a default name and data type to each column. It also specifies whether each column accepts NULL values. You can use the default information or change it as necessary. When you are finished customizing the columns, the procedure creates the DBMS table and loads or appends the input data.

About DBLOAD Procedure Statements

There are several types of DBLOAD statements:
This table summarizes PROC DBLOAD options and statements that are required to accomplish common tasks.
Statement Sequence for Accomplishing Common Tasks with the DBLOAD Procedure
Task
Options and Statements to Use
Create and load a DBMS table
PROC DBLOAD
statement-options;
database-connection-options;
TABLE= <'>table-name<'>;
LOAD;
RUN;
Submit a dynamic, non-query DBMS-SQL statement to DBMS (without creating a table)
PROC DBLOAD
statement-options;
database-connection-options;
SQL DBMS-specific-SQL-statements;
RUN;
LOAD must appear before RUN to create and load a table or append data to a table.