Previous Page | Next Page

SAS/ACCESS Interface to DB2 Under z/OS

DBLOAD Procedure Specifics for DB2 Under z/OS


Key Information

See DBLOAD Procedure for general information about this feature. DB2 z/OS examples are available.

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


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-data-library';
libname dlib 'SAS-data-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-data-library';

proc dbload dbms=db2 data=work.schedule;
  in sample;
  server=testserver;
  accdesc=adlib.schedule;
  table=testid.schedule;
  list all;
  load;
run;

Previous Page | Next Page | Top of Page