BookmarkSubscribeRSS Feed
mlogan
Lapis Lazuli | Level 10

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

4 REPLIES 4
SASKiwi
PROC Star

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?

andreas_lds
Jade | Level 19

Please post the code you used to connect to the db and the log of that step.

ErikLund_Jensen
Rhodochrosite | Level 12

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. 

 

Ksharp
Super User

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.

 

Ksharp_0-1663070318349.png

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 711 views
  • 1 like
  • 5 in conversation