I am brand new and would like to access the data on my SAS server with the R program.
Is it possible to create such a connection with ODBC?
R Code:
library(odbc)
connection_string <- "DRIVER={SAS IOM Data Server};SERVER="...";PORT="...";TRUSTED_CONNECTION=YES;"
con <- dbConnect(odbc::odbc(), .connection_string = connection_string)
data_sources <- odbcListDataSources()
dbDisconnect(con)
If yes, how can i setup ODBC on my server, otherwise are there other options here?
Thanks in advance
You would need the SAS ODBC driver on the computer where you run R, and SAS/SHARE licensed and set up on the SAS server.
If you have SAS/IML licensed, you can use R from within SAS.
Hello
If it is your intention to read SAS datasets (sas7bdat files) then you can read them directly without connecting to a SAS server.
The following link has the details with examples.
You would need the SAS ODBC driver on the computer where you run R, and SAS/SHARE licensed and set up on the SAS server.
If you have SAS/IML licensed, you can use R from within SAS.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.