BookmarkSubscribeRSS Feed
MidwestAnalyst
Calcite | Level 5

I just opened a SAS dataset stored on my hard drive by double clicking on the file, which opened a temporary dataset in SAS. I then changed my mind and decided I wanted to work directly with the file stored in the folder (i.e: by creating a library for the folder the file lives in). Further, since this is a very large file, I need to be be mindful of duplicate copies (or at least what I thought would be a duplicate copy), so I deleted the temporary file from the "tmp1" folder. 

 

After deleting the file from the tmp1 folder, I went back to the original folder where the files lives on my hard drive and noticed the file was now gone from that location. Does deleting a temporary file in SAS also delete the file from its source location on the hard drive? Why would this happen? Any perspectives on this, or whether the file may still live somewhere on my hard drive, would be appreciated! I did check to see whether it showed up in my recycle bin, and it did not. 

2 REPLIES 2
Kurt_Bremser
Super User

When you double-click on a .sas7bdat, no copy is made. SAS instead defines a temporary library for the directory the file resides in, and opens the dataset from there. A delete therefore removes the file from where it was.

 

Since you couldn't find the file in the Windows trashcan, your only hope is a backup.

FreelanceReinh
Jade | Level 19

There are also recovery tools on the market which are able to recover, e.g., files which have been deleted with SHIFT-DEL (i.e. bypassing the Windows recycle bin). I'm not sure, however, if they can help in your case, in particular if you continued using your computer (or restarted it) after deleting the file.

 

On my machine I have changed the default file associations, so that a double-click on a .sas7bdat file (or .sas file) in a Windows Explorer window launches SAS Universal Viewer (SAS.UniViewer.exe), not SAS (sas.exe).

 

Good luck!

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!

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
  • 2 replies
  • 4448 views
  • 0 likes
  • 3 in conversation