I'm trying to create table via oracle table. When I tried to run the code below,
%include "/usr/sas/tir/sa_connect.txt"; proc sql; create table mibipads select * from connection to odbc (select bipad,title from mas.bipad_master); disconnect from odbc; quit;
I got error as,
ERROR: CLI error trying to establish connection: [unixODBC][Driver Manager]Data source name not found, and no default driver
sa_connect.txt file having the details to connect oracle from SAS and I it don't seem issue with this .txt. Can someone guide where I need to tweak the code to run without any errors.
You are missing the connection part, the syntax is something like:
connect to odbc (user="ABC",password=...);
select * from connection to odbc (select * from abc);
disconnect from odbc;
See here for an Oracle version, you will need something similar for your database.
Why do you have the connection string in a text file? If so then you only need to put the connect part, and include at the place the included text should appear:
connect to odbc (user=*** password=****_proddb dsn='******');
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.