07-20-2017 12:01 PM
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
07-20-2017 12:07 PM
Too little information. How/what are you doing? Have you followed the instructions to create a library on the virtual image:
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;
07-20-2017 12:20 PM - edited 07-20-2017 12:24 PM
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."
07-20-2017 12:21 PM
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?
07-20-2017 12:31 PM
07-20-2017 12:07 PM
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'.
07-20-2017 12:23 PM
07-20-2017 12:32 PM
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.
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.
07-20-2017 01:00 PM
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.
07-20-2017 01:14 PM - edited 07-20-2017 01:25 PM
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'.
If you have permission then right click on the filename and select Rename.
Then you can open it.
07-20-2017 01:28 PM