You can use these SAS system options when you start a SAS session that accesses DB2 under z/OS.
specifies the value of the DB2 DECPOINT= option. The decpoint-value argument can be a period (.) or a comma (,). The default is a period (.).
DB2DECPT= is valid as part of the configuration file when you start SAS.
lets you specify the database and tablespace in which you want to create a new table. The DB2IN= option is relevant only when you are creating a new table. If you omit this option, the default is to create the table in the default database and tablespace.
database.tablespace specifies the names of the database and tablespace.
'DATABASE database-name' specifies only the database name. Enclose the entire specification in single quotation marks.
You can override the DB2IN= system option with the IN= LIBNAME or data set option.
specifies the name of the plan that is used when connecting (or binding) SAS to DB2. SAS provides the DBRM members that can be used to create a DB2 plan, The plan can be adapted for each user's site. The value for DB2PLAN= can be changed at any time during a SAS session, so that different plans can be used for different SAS steps. However, if you use more than one plan during a single SAS session, you must understand how and when SAS/ACCESS Interface to DB2 under z/OS makes the connections. If one plan is in effect and you specify a new plan, the new plan does not affect the existing DB2 connections.
specifies the attachment facility to be used for a SAS session when connecting to DB2. This option is an invocation-only option.
Specify NODB2RRS, the default, to use the Call Attachment Facility (CAF). Specify DB2RRS to use the Recoverable Resource Manager Services Attachment Facility (RRSAF). For details about using RRSAF, see How the Interface to DB2 Works..
specifies that the multiphase SRRCMIT commit and SRRBACK rollback calls are used instead of the COMMIT and ROLLBACK SQL statements. This option is ignored unless DB2RRS is specified. This option is available only at invocation.
Specify NODB2RRSMP, the default, when DB2 is the only Resource Manager for your application. Specify DB2RRSMP when your application has other resource managers, which requires the use of the multiphase calls. Using the multiphase calls when DB2 is your only resource manager can have performance implications. Using COMMIT and ROLLBACK when you have more than one resource manager can result in an error, depending on the release of DB2.
specifies the DB2 subsystem name. The subsystem-name argument is one to four characters that consist of letters, numbers, or national characters (#, $, or @); the first character must be a letter. The default value is DB2. For more information, see Values.
DB2SSID= is valid in the OPTIONS statement, as part of the configuration file, and when you start SAS.
You can override the DB2SSID= system option with the SSID= connection option.
specifies whether the user has privileges through SAS/ACCESS Interface to DB2 under z/OS to update DB2 tables. This option applies only to the user's Update privileges through the interface and not necessarily to the user's privileges while using DB2 directly. Altering the value of DB2UPD= has no effect on your DBMS privileges, which have been specified with the GRANT statement. The default is Y (Yes).
DB2UPD= is valid in the OPTIONS statement, as part of the configuration file, and when you start SAS. This option does not affect PROC DBLOAD or the SAS 5 compatibility procedures.
To connect to DB2, you must specify a valid DB2 subsystem name in one of these ways.
If a site does not specify a valid DB2 subsystem when it accesses DB2, this message is generated:
ERROR: Cannot connect to DB2 subsystem XXXX,
rc=12, reason code = 00F30006. See the
Call Attachment Facility documentation
for an explanation.
XXXX is the name of the subsystem to which SAS tried to connect. To find the correct value for your DB2 subsystem ID, contact your database administrator.
Use the automatic SYSDBRC macro variable to capture return codes when using the DB2 engine. The macro variable is set to the last return code that was encountered when code execution took place using a SAS/ACCESS interface. If SAS/ACCESS Interface to DB2 under z/OS was the last usage of a SAS/ACCESS interface, then SYSDBRC contains the last DB2 return code. If you reference SYSDBRC before engine processing takes place, you receive this message:
WARNING: Apparent symbolic reference SYSDBRC not resolved.
Use SYSDBRC for conditional post-processing. Below is an example of how to abend a job. The table DB2TEST is dropped from DB2 after the view descriptor is created, resulting in a –204 code.
data test;
x=1;
y=2;
proc dbload dbms=db2 data=test;
table=db2test;
in 'database test';
load;
run;
proc access dbms=db2;
create work.temp.access;
table=user1.db2test;
create work.temp.view;
select all;
run;
proc sql;
execute(drop table db2test)by db2;
quit;
proc print data=temp;
run;
data _null_;
if "&sysdbrc" not in ('0','100') then
do;
put 'The DB2 Return Code is: ' "&sysdbrc";
abort abend;
end;
run;
Because an abnormal end to processing prevents the log from being captured, you must capture the SAS log by using the SAS system option, ALTLOG=. For more information, see SAS System Options: Reference