DBLOAD Procedure

SQL Statement

Submits a dynamic, nonquery, DBMS-specific SQL statement to the DBMS

Restriction: You cannot create a DBMS table and reference it in your DBMS-specific SQL statements within the same PROC DBLOAD step. The new table is not created until the RUN statement is processed.
Requirements: You must enter the keyword SQL before each DBMS-specific SQL statement that you submit.
You must use DBMS-specific SQL object names and syntax in the DBLOAD SQL statement.
Note: You can use the DBLOAD statement to submit these DBMS-specific SQL statements, despite whether you create and load a DBMS table.
Tip: To submit dynamic, non-query DBMS-specific SQL statements to the DBMS without creating a DBMS table, use the DBMS= option, any database connection statements, and the SQL statement.
Example: This example grants UPDATE privileges to user MARURI on the DB2 SasDemo.Orders table.
proc dbload dbms=db2;
   in sample;
   sql grant update on sasdemo.orders to maruri;
run;

Syntax

Required Argument

DBMS-specific-SQL-statement

specifies any valid dynamic DBMS-specific SQL statement except the SELECT statement. However, you can enter a SELECT statement as a substatement within another statement, such as in a CREATE VIEW statement.

Last updated: February 3, 2026