DBLOAD Procedure Specifics for DB2 under UNIX and PC Hosts

Key Information

For general information about this feature, see DBLOAD Procedure.

SAS/ACCESS Interface to DB2 under UNIX and PC Hosts supports all DBLOAD procedure statements in batch mode.

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

Here are the DBLOAD procedure specifics for the DB2 under UNIX and PC Hosts interface.

Examples

This example creates a new DB2 table, SASDEMO.EXCHANGE, from the MYDBLIB.RATEOFEX data file. You must be granted the appropriate privileges in order to create new DB2 tables or views.

proc dbload dbms=db2 data=mydblib.rateofex;
   in='sample';
   user='myusr1';
   password=mypwd1;
   table=sasdemo.exchange;
      rename fgnindol=fgnindollars
         4=dollarsinfgn;
   nulls updated=n fgnindollars=n
         dollarsinfgn=n country=n;
   load;
run;

This example sends only a DB2 SQL GRANT statement to the SAMPLE database and does not create a new table. Therefore, the TABLE= and LOAD statements are omitted.

proc dbload dbms=db2;
   in='sample';
   sql grant select on sasdemo.exchange
      to myusr1;
run;
Last updated: February 3, 2026