Hi All,
I am having issue connecting to DB2 database server using sas base. Can someone assist me on how to accomplish that. I have tried following many online blog, but everything failed.
Thanks for your help
Shak
First of all you can't access DB2 using Base SAS, you need the SAS product SAS/ACCESS to DB2 both installed and licensed. Has this been done? If so has anyone successfully used it yet?
Please post the code you used to connect to the db and the log of that step.
Hi @mlogan
Another possibility is to install an ODBC driver that acts as a bridge to DB2, so SAS can access DB2 batabases using access to ODBC and an entry in the odbc.ini file pointing to the DB2/ODBC driver. It works very well for us, both in out current Linux installation and earlier on Windows servers.
Unfortunately I can't be to further help when it comes to the technical details about installation and setup. We used external help for that part.
Firstly, using " proc setinit;run; " to check if you have ACCESS/ODBC license,
if you have ODBC driver of DB2 , you could follow this ,
after config a data source succesfully ,
using " libname x odbc dsn= " to connect to DB2.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.