For general information about this feature, see the ACCESS procedure.
SAS/ACCESS Interface to DB2 under z/OS supports all ACCESS procedure statements in interactive line, noninteractive, and batch modes.
Here are the ACCESS procedure specifics for the DB2 under z/OS interface.
db2.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. In batch mode, however, you must specify an authorization ID. Otherwise, an error message is generated.
This example creates an access descriptor and a view descriptor that are based on DB2 data.
options linesize=80;
libname adlib 'SAS-library';
libname vlib 'SAS-library';
proc access dbms=db2;
/* create access descriptor */
create adlib.customr.access;
table=testid.customers;
ssid=db2;
assign=yes;
rename customer=custnum;
format firstorder date7.;
list all;
/* create vlib.usacust view */
create vlib.usacust.view;
select customer state zipcode name
firstorder;
subset where customer like '1%';
run;
This next example uses the SERVER= statement to access the SQL/DS table Testid.Orders from a remote location. Access and view descriptors are then created based on the table.
libname adlib 'SAS-library';
libname vlib 'SAS-library';
proc access dbms=db2;
create adlib.customr.access;
table=testid.orders;
server=testserver;
assign=yes;
list all;
create vlib.allord.view;
select ordernum stocknum shipto dateorderd;
subset where stocknum = 1279;
run;