DBLOAD Procedure Specifics for DB2 under z/OS

Key Information

For general information about this feature, see the DBLOAD procedure.

SAS/ACCESS Interface to DB2 under z/OS supports all DBLOAD procedure statements in interactive line, noninteractive, and batch modes.

Note: SAS still supports this legacy procedure. However, to send data from SAS to your DBMS more directly the best practice is to use the LIBNAME statement for DB2 under z/OS or the SQL pass-through facility. For more information, see LIBNAME Statement for the DB2 Engine under z/OS and SQL Pass-Through Facility Specifics for DB2 under z/OS.

Here are the DBLOAD procedure specifics for SAS/ACCESS Interface to DB2 under z/OS.

DBLOAD Procedure Examples

This example creates a new DB2 table, Testid.Invoice, from the Dlib.Invoice data file. The AmtBilled column and the fifth column in the table (AmountInUS) are renamed. You must have the appropriate privileges before you can create new DB2 tables.

libname adlib 'SAS-library';
libname dlib 'SAS-library';

proc dbload dbms=db2 data=dlib.invoice;
   ssid=db2;
   table=testid.invoice;
   accdesc=adlib.invoice;
   rename amtbilled=amountbilled
          5=amountindollars;
   nulls invoicenum=n amtbilled=n;
   load;
run;

For example, you can create a SAS data set, Work.Schedule, that includes the names and work hours of your employees. You can use the SERVER= command to create the DB2 table, Testid.Schedule, and load it with the schedule data on the DRDA resource, TestServer, as shown in this example.

libname adlib 'SAS-library';

proc dbload dbms=db2 data=work.schedule;
  in sample;
  server=testserver;
  accdesc=adlib.schedule;
  table=testid.schedule;
  list all;
  load;
run;
Last updated: February 3, 2026