Write and run SAS programs in your web browser

error in opening sas7bdat file (File _TEMP2.<filename>.DATA does not exist.)

Reply
Occasional Contributor
Posts: 5

error in opening sas7bdat file (File _TEMP2.<filename>.DATA does not exist.)

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

Super User
Super User
Posts: 7,413

Re: error in opening sas7bdat file (File _TEMP2.<filename>.DATA does not exist.)

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;
Occasional Contributor
Posts: 5

Re: error in opening sas7bdat file (File _TEMP2.<filename>.DATA does not exist.)

[ Edited ]

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

 

 

Super User
Posts: 17,888

Re: error in opening sas7bdat file (File _TEMP2.<filename>.DATA does not exist.)

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?

 

 

Occasional Contributor
Posts: 5

Re: error in opening sas7bdat file (File _TEMP2.<filename>.DATA does not exist.)

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.
Super User
Super User
Posts: 6,502

Re: error in opening sas7bdat file (File _TEMP2.<filename>.DATA does not exist.)

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

Occasional Contributor
Posts: 5

Re: error in opening sas7bdat file (File _TEMP2.<filename>.DATA does not exist.)

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.
Super User
Super User
Posts: 6,502

Re: error in opening sas7bdat file (File _TEMP2.<filename>.DATA does not exist.)

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.

 

Super User
Posts: 17,888

Re: error in opening sas7bdat file (File _TEMP2.<filename>.DATA does not exist.)

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. 

 

Super User
Super User
Posts: 6,502

Re: error in opening sas7bdat file (File _TEMP2.<filename>.DATA does not exist.)

[ Edited ]

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

Occasional Contributor
Posts: 5

Re: error in opening sas7bdat file (File _TEMP2.<filename>.DATA does not exist.)

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!
Ask a Question
Discussion stats
  • 10 replies
  • 334 views
  • 2 likes
  • 4 in conversation