BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
CoTheiss
Calcite | Level 5

Hi Everyone.

I got the task to extract data from a sas7bdat-file, provided by a customer to use the data for further analysis.

As we are not using SAS, there is no instalation of any SAS product on our system.

I started configuring the OLEDB driver but found that it is not able to perform SQL-Statements later.

Now i am trying to configure ODBC driver (SAS_ODBC_Driver_9.3).

Currently I am facing the problem, that the ODBC driver seems to require sas.exe  (please see attached screenshot).

Could anyone please tell me, if (and how) it is possible to configure the ODBC driver to load data from locally saved sas7bdat files?

Is a installation of SAS necessary? If yes, which product?

I hope anyone of you could help me as noone of our team has any experience with SAS yet ..

1 ACCEPTED SOLUTION

Accepted Solutions
esjackso
Quartz | Level 8

I think the universal viewer supersedes the one above and is for SAS 9.3 and earlier.

SAS Institute Inc. Software Downloads

I dont really know if it will allow export of the data from the format or not but should allow you to open the file.

EJ

View solution in original post

11 REPLIES 11
esjackso
Quartz | Level 8

I think the universal viewer supersedes the one above and is for SAS 9.3 and earlier.

SAS Institute Inc. Software Downloads

I dont really know if it will allow export of the data from the format or not but should allow you to open the file.

EJ

CoTheiss
Calcite | Level 5

Hi Everyone

first of all: thanks for your help!

I just installed SAS Universal Viewer and saved the data as xml to get a first impression of the data in our tool.

Is there any possibility to open and save a file (sas7bdat to xml) with universal viewer  via cmd.exe ?

I am currently searching in the documentation for any hint, but did not find anything until now.

If ODBC requires a SAS Server to be running, I have to send some requests to our customer to get information of their SAS infrastructure.

esjackso
Quartz | Level 8

I would be surprised if the viewer has a command line interface built by SAS. Seems against its best interest to easy allow people out of there proprietary system easily. Seems to me if you are going to ask questions to your customer about their setup (which probably wont help you unless they are opening they network / system up to you for direct access), you should just ask for the files in a format you can use (as already stated in the some other replies).

I believe R does have a command line interface that may be useful for this and its an open source product which is free.

EJ

Reeza
Super User

If you need to move SAS datasets to a server, its much easier if you have SAS, BASE SAS or DI Studio I suppose.

Or export from SAS datasets to text files. You can use an intermediary program such as R, but its another place to have errors pop up.

You may want to explain more of what you're trying to do if you want further help.

Tom
Super User Tom
Super User

I think you need SAS running somewhere for ODBC to SAS to work.

You could get a copy of STAT/TRANSFER and convert the file to some other format.

Reeza
Super User

You can read SAS files with R and then export back out to a CSV file. Or ask your client to provide a CSV file.

Or SPSS.

keV
Calcite | Level 5 keV
Calcite | Level 5

I'm not sure where how you are creating the OleDb connection, but it is perfectly possible to read SAS files without an installation of SAS using the Local provider.

It doesn't support SQL commands but you can still get all the schema information you need and open a DataReader.

jakarman
Barite | Level 11

same as: https://communities.sas.com/message/106693

remember the sas7bdat dataset type is a propierty format and not free published.

Seeing the tools as Stat/Transfer as a possible approach.

I remember once the exist the tool DBMSCOPY that one has been bought by SAS institute.

---->-- ja karman --<-----
Andre
Obsidian | Level 7

Be carefull   the test version of Stattransfer skips every 18th record !

AW

jakarman
Barite | Level 11

Agree on that Andre. I made the remark on propierty format for that reason. All third party interfaces are possible based on reverse engineering. You never know hitting something they missed.

As for data-exchange for incompatible systems it would be better using the XML format (adding zip) as that is designed for that purpose.

My advice would be:  asking for XML version of the needed data 

---->-- ja karman --<-----

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

CLI in SAS Viya

Learn how to install the SAS Viya CLI and a few commands you may find useful in this video by SAS’ Darrell Barton.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 11 replies
  • 24686 views
  • 1 like
  • 8 in conversation