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.
Here are the DBLOAD procedure specifics for SAS/ACCESS Interface to DB2 under z/OS.
DB2.lets you specify whether DB2 columns that are associated with the listed SAS variables allow NULL values. By default, all columns accept NULL values.
The NULLS statement accepts any one of these values.
For information about NULL values that is specific to DB2, see DB2 Null and Default Values.
identifies the DB2 table or DB2 view that you want to use to create an access descriptor. The table-name is limited to 18 characters. The TABLE= statement is required.
The authorization-id is a user ID or group ID that is associated with the DB2 table. The authorization ID is limited to eight characters. If you omit the authorization ID, DB2 uses your TSO (or z/OS) user ID. However, in batch mode, you must specify an authorization ID or an error message is generated.
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;