The following example
shows how to use a SAS data set, SASFLT.FLT98, to create and load
a large DB2 table, FLIGHTS98. Because the code specifies BULKLOAD=YES
and BL_REMOTE_FILE= is omitted, this load uses the DB2 IMPORT command.
libname sasflt 'SAS-library';
libname db2_air db2 user=louis using=fromage
database='db2_flt' schema=statsdiv;
proc sql;
create table db2_air.flights98
(bulkload=YES bl_options='compound=7 norowwarnings')
as select * from sasflt.flt98;
quit;
The BL_OPTIONS= option
passes DB2 file type modifiers to DB2. The
norowwarnings
modifier
indicates that all row warnings about rejected rows are to be suppressed.
The following example
shows how to append the SAS data set, SASFLT.FLT98 to a pre-existing
DB2 table, ALLFLIGHTS. Because the code specifies BULKLOAD=YES and
BL_REMOTE_FILE=, this load uses the DB2 LOAD command.
proc append base=db2_air.allflights
(BULKLOAD=YES
BL_REMOTE_FILE='/tmp/tmpflt'
BL_LOG='/tmp/fltdata.log'
BL_DATAFILE='/nfs/server/tmp/fltdata.ixf'
BL_SERVER_DATAFILE='/tmp/fltdata.ixf')
data=sasflt.flt98;
run;
Here, BL_REMOTE_FILE=
and BL_SERVER_DATAFILE= are paths relative to the server. BL_LOG=
and BL_DATAFILE= are paths relative to the client.
The following example
shows how to use the SAS data set SASFLT.ALLFLIGHTS to create and
load a large DB2 table, ALLFLIGHTS. Because the code specifies BULKLOAD=YES
and BL_METHOD=CLILOAD, this operation uses the DB2 CLI LOAD interface
to the LOAD command.
data db2_air.allflights(BULKLOAD=YES BL_METHOD=CLILOAD);
set sasflt.allflights;
run;