SAS Statements for Loading DB2 Table BankChrg

Creating SAS Data Set MyData.Bank

The SAS data set MyData.Bank is used to load the DB2 table BankChrg.
Note: If you do not have DB2 at your site, change MyData.Bank to MyData.BankChrg and execute only the following program:
data mydata.bank;
  input @1  ssn      $11.
        @13 accountn 12.
        @26 chckchrg 5.2
        @32 atmfee   5.2
        @38 loanchrg 6.2;
  format accountn 14.
         chckchrg 5.2
         atmfee   5.2
         loanchrg 6.2;
  datalines;
667-73-8275 345620145345 3.75  5.00  2.00
434-62-1234 345620104732 15.00 25.00 552.23
436-42-6394 345620135872 1.50  7.50  332.15
434-62-1224 345620134564 9.50  0.00  0.00
178-42-6534 .            0.50  15.00 223.77
156-45-5672 345620123456 0.00  0.00  0.00
657-34-3245 345620132455 10.25 10.00 100.00
667-82-8275 .            7.50  7.50  175.75
456-45-3462 345620134522 23.00 30.00 673.23
234-74-4612 345620113262 4.50  7.00  0.00
;

proc print data=mydata.bank;
  title2 'SAS Data Set MYDATA.BANK';
run;

Loading DB2 Table BankChrg from MyData.Bank

The following program loads DB2 table BankChrg from the SAS data set MyData.Bank. You must have DB2 installed at your site to run this program.
proc dbload dbms=db2 data=mydata.bank;
  accdesc=mylibdb2.bankchrg;
  table=<owner>.bankchrg;
  load;
run;

DB2 View Descriptor for BankChrg

The following program creates a DB2 view descriptor for the DB2 table BankChrg. You must have DB2 installed at your site to run this program.
proc access dbms=db2 ad=mylibdb2.bankchrg;
  create vlibdb2.bankchrg.view;
  select all;
  list view;
run;

proc print data=vlibdb2.bankchrg;
  title2 'DB2 Table BANKS.BANKCHRG';
run;