BookmarkSubscribeRSS Feed
gabras
Pyrite | Level 9

Hi,

 

i need some help about the possibility of extracting SAS data from outside SAS.

I have to create three sas view that my Customer has to execute and read when he wants. Theese views will be stored in Sql server.

 

Does anyone know how it can be done?

 

Thank you

3 REPLIES 3
ChrisHemedinger
Community Manager

To be clear, you're reading non-SAS data (SQL server) from a SAS process? Yes, you can do that.

 

Assuming that you have SAS/ACCESS to ODBC or SAS/ACCESS to OLE DB, you assign a SAS library to your database connection.  Exact syntax for this may vary, but it will look something like this:

 

libname mydblib oledb 
 user=myusr1 password=mypwd1
 datasource=dept203 provider=sqloledb 
 properties=('initial catalog'=mgronly);

Then you can access the tables/views with normal LIBNAME.MEMBER syntax (ex: mydblib.mydata).

 

See documentation here for OLE DB.  And here for ODBC.

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.
gabras
Pyrite | Level 9

Hi @ChrisHemedinger

unfortuntely not.

 

It's the opposite. The customer has to read a sas data from outside SAS.

Pippo Company has to read the SAS view and bring it on its db.

 

Thank you

 

ChrisHemedinger
Community Manager

Okay -- for that, we have the SAS IOM Provider for OLE DB (use this to connect to a SAS workspace, similar to the way SAS Enterprise Guide works) and the SAS ODBC Driver (connects to SAS/SHARE server or SPDS server).  Either way, I think to render a SAS view you'll need the driver to connect to a running instance of SAS that can assemble the data rows, with any SAS formats you need, etc.

Learn from the Experts! Check out the huge catalog of free sessions in the Ask the Expert webinar series.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

SAS Enterprise Guide vs. SAS Studio

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 902 views
  • 2 likes
  • 2 in conversation