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

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