SAS/ACCESS Interface to DB2 allows you to access a DB2 database from
SAS. To verify that this product is licensed, invoke SAS and submit
the following in the SAS Program Editor screen:
proc setinit noalias;
run;
and look in the SASLOG for
---SAS/ACCESS Interface to DB2
If you do not see the SAS/ACCESS Interface to DB2 product listed, then
it is not licensed. If the product is listed, then verify that it is
installed.
To verify that the SAS/ACCESS Interface to DB2 product is installed, the
following file, sasdbu, must reside in the !SASROOT/sasexe directory,
where !SASROOT is the directory where SAS is installed. Issue the
following commands to see if this file is installed.
unix_prompt> cd !SASROOT/sasexe
unix_prompt> ls -la sasdbu
If the "sasdbu" file does not exist then the product is not installed.
Below are the system requirements for using SAS/ACCESS Interface to DB2
on Unix for SAS 9.:
- Base SAS software
- SAS/ACCESS Interface to DB2 software
- DB2 Universal Database, Version 7.1 or higher (64-bit libraries)
SAS/ACCESS Interface to DB2 can be installed on a DB2 server or on a DB2
client node with an installation of the DB2 Run-Time Client, DB2
Application Development Client, or DB2 Administration Client. In
addition, DB2 Connect must be installed to connect to DB2 databases that
reside on AS/400, VSE, VM, MVS, and OS/390 systems.
The DB2 release may vary depending on the the Unix platform and SAS
Release so verify that you meet the system requirements by selecting the
appropriate operating system from the following link and view the system
requirements for SAS/ACCESS Interface to DB2.
http://support.sas.com/documentation/installcenter/basic.html
If you meet the system requirements and you have all the necessary
software products, you must now configure the pruct using the
instructions in the SAS Configuration Guide.
http://support.sas.com/documentation/installcenter/the_sas_system/9.1.3_TS1M3/unx/config.pdf
NOTE: It is recommended that the environment variables should be set
in the "sasenv_local" file located in the !SASROOT/bin directory.
Prior to SAS 9.1.3 Service Pack 4, these environment variables
are recommended to be set in the "sasenv" file.
Be sure you have all the appropriate enviroment variables set
appropriately and that your DB2 environment is set-up correctly. To
verify that DB2 is configured appropriately outside of SAS, test a
connection using the DB2 Command Line Processor (DB2 CLP) on the SAS
server, as follows:
unix_prompt> db2
db2=> connect to dbname user userid using userpw
db2=> select count(*) from table_name
db2=> quit
/* Where dbname, userid, userpw and table_name are valid DB2 values */
If you can NOT connect outside of SAS using the DB2 CLP, then you will
need to contact your DB2 DBA for assistance in getting this to work.
Once you are able to connect outside of SAS using DB2 CLP and you have
configured SAS correctly, you are now ready to access DB2 from within
SAS. You can use the following access LIBNAME engine with SAS/ACCESS
Interface to DB2 example to test your connection:
libname db2lib db2 user=userid password=userpw database=dbname;
/* Use the same connections values used with DB2 CLP */
proc sql;
select count(*) from db2lib.table_name;
quit;
data work.new;
set db2lib.table_name;
run;
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to DB2 | Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 | |
| 64-bit Enabled Solaris | 9.1 TS1M3 | |
| Linux | 9.1 TS1M3 | |
| Linux on Itanium | 9.1 TS1M3 | |
| HP-UX IPF | 9.1 TS1M3 | |
| 64-bit Enabled HP-UX | 9.1 TS1M3 | |
| 64-bit Enabled AIX | 9.1 TS1M3 | |
| Tru64 UNIX | 9.1 TS1M3 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.