DBLOAD Procedure

Sending Data from SAS to a DBMS

SAS still supports this legacy procedure. However, to send data from SAS to a DBMS more directly, it is recommended that you use the SAS/ACCESS LIBNAME statement or the SQL pass-through facility. To determine whether this feature is available in your environment for your interface, see SAS/ACCESS Features by Host.

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 set
  • 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

This procedure has several types of 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 (LOAD must appear before RUN to create and load a table or append data to a 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;
Last updated: February 3, 2026