Unable to open .sas7bdat file

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

Unable to open .sas7bdat file

I'm reacquainting myself with SAS after about 4 years- not able to open a .sas7bdat file.

 

I get the error message attached below. Can anyone tell me what the problem is?


error message.jpg

Accepted Solutions
Solution
‎03-21-2017 07:52 PM
Super User
Posts: 18,997

Re: Unable to open .sas7bdat file

You don't import a file. Assign a library and try and connect to the file.

If it's a mismatch with types there's usually, but not always, different errors than the one indicated.

 

libname pathFile '/folders/myfolders/myfiles/';

 

proc contents data=pathFile;

run;

 

 

View solution in original post


All Replies
Super User
Posts: 18,997

Re: Unable to open .sas7bdat file

Given the error most likely you're referencing the data incorrectly doing something wrong. But since you haven't provided any other information that's all we can say. 

 

How are you trying to 'open' this file? What options have you tried that didn't work? More information please.

 

https://communities.sas.com/t5/SAS-Communities-Library/How-to-ask-a-question-in-SAS-Analytics-U-Comm...

New Contributor
Posts: 4

Re: Unable to open .sas7bdat file

Initially I tried opening it by double clicking on the file. It works for the other files...

 

Then I tried this code:

 

proc import out=work.pat
       datafile="C:\Users\mahes\Documents\Research\Current\eurobact\sas data files\pat.sas7bdat"
       dbms=pcfs;
run;

Bridge server not answering
ERROR: Import unsuccessful.  See SAS Log for details.

 

Super User
Posts: 11,101

Re: Unable to open .sas7bdat file

Did the dataset originate in a different operating system?

 

A different version of SAS?

Note that one of the things that has crept in with 64 bit files is that older versions of SAS may well not open a current data set.

So which version of SAS are you using? Do you know which created it?

 

Are there any operating system permissions issues such as the data set being read only or you as a user not having permission to read it?

New Contributor
Posts: 4

Re: Unable to open .sas7bdat file

Actually that's a good point.

 

I'm using SAS 9.4 on a 64-bit windows 10 computer. I don't know which version of SAS the file was created in but that may well be problem. I'll try to find out.

 

I don't think permissions are an issue on my computer.

 

I'll try to open the file on my old computer which I think still has SAS 9.2 in case that works...

 

Thanks for the reply. Much appreciated.

Solution
‎03-21-2017 07:52 PM
Super User
Posts: 18,997

Re: Unable to open .sas7bdat file

You don't import a file. Assign a library and try and connect to the file.

If it's a mismatch with types there's usually, but not always, different errors than the one indicated.

 

libname pathFile '/folders/myfolders/myfiles/';

 

proc contents data=pathFile;

run;

 

 

New Contributor
Posts: 4

Re: Unable to open .sas7bdat file

Thanks for that. Makes sense. And it seems to work.

 

Appreciate your help..

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 228 views
  • 0 likes
  • 3 in conversation