BookmarkSubscribeRSS Feed
lalvar39
Calcite | Level 5

Hi, 

I am trying to open a sas7bdat file using SAS Studio and I am getting the following error.

File _TEMP2.<filename>.DATA does not exist.

 

Thanks in advance

10 REPLIES 10
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Too little information.  How/what are you doing?  Have you followed the instructions to create a library on the virtual image:

https://support.sas.com/software/products/university-edition/faq/SAS_libname.htm

 

You would copy the file onto the virtual image (assuming you using that version) into a folder, then libname in SAS to point to the folder on the virtual image, then you can use the datafile:

libname mylib "/folders/myfolders";

data test;
  set mylib.thedatasetname;
run;
lalvar39
Calcite | Level 5

Hi, sorry for the few info.

 

the Error that I posted is what I get when opening it interactively, browsed the actual file and double clicked to open.

 

I tried opening by creating a library (usual libname then data step). then I am getting this error, "ERROR: File NLIB.<filename>.DATA does not exist."

 

 

Reeza
Super User

Show a proc datasets on the library and make sure the data file does exist in the folder you think it does.

Are you using an English browser?

 

 

lalvar39
Calcite | Level 5
Hi Reeza, Yes I am using an english browser.
To add, I opened the file interactively, meaning i browsed the file in SAS Studio explorer. I also tried using SAS JMP to open the file, both interactively and programatically, still I get the error.
Tom
Super User Tom
Super User

Are you sure there is such a file?

What path is _TEMP2 libref pointing to? Use can use the PATHNAME() function to find out. Or check the properties in the SAS/Studio interface.

Is SAS running on Unix (if you are using SAS University Edition then it definitely is running on unix)?  If so then make sure the physical filename is using all lowercase letters.  So if you have a table that you might call in SAS as _temp2.MyTable the physical file needs to be 'mytable.sas7bdat'.

lalvar39
Calcite | Level 5
Yes Tom the file exist, the error that I posted is what I get when I tried opening the file interactively, by browsing the file and opening it. using libname then data step is posting me this error,
ERROR: File NLIB.<filename>.DATA does not exist.
Tom
Super User Tom
Super User

So what path is either _TEMP2 or NLIB pointing to?

Is the file you are trying to read actually there?

Do you have permission to read it?

Is the filename in the proper case?  If you renamed or copied from a PC and the filename is 'xxxJULYxxx.sas7bdat' then it is not going be found because if you ask SAS to open NLIB.xxxJULYxxx it will try to open a file named 'xxxjulyxxx.sas7bdat' in the directory that NLIB points to.


@lalvar39 wrote:
Yes Tom the file exist, the error that I posted is what I get when I tried opening the file interactively, by browsing the file and opening it. using libname then data step is posting me this error,
ERROR: File NLIB.<filename>.DATA does not exist.

 

Reeza
Super User

My guess is the file was created on a different system (ie Windows) and you're using a system so it's not seeing it for some reason. I've seen this happen in SAS UE for some reasons. It usually has to do with the reason above, or a corrupt file, and/or someone spelling the path incorrectly - it is case sensitive. 

 

Tom
Super User Tom
Super User

Make sure the physical filename is in all lowercase letters and is valid for use as a SAS membername.

 

Here is an example of what happens when it is not.

I made an empty directory and created a copy of the SASHELP.CLASS dataset there.

libname test '~/templib';
data test.class;
  set sashelp.class;
run;

I then went onto the Unix server and copied the file to another file with mixed case letters in the name.

> cp class.sas7bdat BADname.sas7bdat

Now in SAS/Studio I can browse to that folder and open 'class.sas7bdat'. But I cannot open 'BADname.sas7bdat'.

Capture.PNG

If you have permission then right click on the filename and select Rename.

Capture.PNG

Then you can open it.

Capture.PNG

lalvar39
Calcite | Level 5
Hi Tom,
Seems like that it is the cause of the problem (renaming of the original file with uppercase). I will check back to the source of the file if such actions were done.
Thanks!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

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
  • 10 replies
  • 3028 views
  • 2 likes
  • 4 in conversation