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

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
1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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

6 REPLIES 6
Reeza
Super User

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...

mramanan
Calcite | Level 5

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.

 

ballardw
Super User

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?

mramanan
Calcite | Level 5

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.

Reeza
Super User

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;

 

 

mramanan
Calcite | Level 5

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

 

Appreciate your help..

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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