BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Lifang
Obsidian | Level 7

Hi, I need help with a technical issue. My computer automatically shut down while I was coding in SAS Studio. I saved part of my code before the shutdown. But when I re-opened the file, all the contents were gone, but if I check the file size, it is about the same size as an old version. Can someone teach me how to recover the file to the last saved version?

 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

There's nothing in that file, literally. It is just one big heap of hex 00's.

This looks like some kind of privacy software went over temporary files (on shutdown) to overwrite them with "nothing".

View solution in original post

26 REPLIES 26
Lifang
Obsidian | Level 7

I stored it as xx.sas. I opened the file with a text editor, nothing changed. Still empty. The strange thing is that the size of the file suggests it should not be an empty file.

andreas_lds
Jade | Level 19

All depends where SAS Studio is running and where you have saved the program. So please add information about the environment you are working in.

Lifang
Obsidian | Level 7
I am using SAS Studio single-user version, which is part of SAS 9.4 I have recently installed. Would this information help?
Reeza
Super User
And if you have autosaved enabled. If so, there's a version hanging around somewhere. If you're using UE you're likely hooped because you won't have access to the location where the files were saved. If you're working on an Enterprise environment you may have access to it, assuming you had autosave enabled.
Lifang
Obsidian | Level 7
I am using the enterprise environment. I will look into it. Thanks.
Reeza
Super User

You can find the files in a folder such as:

 

C:\Documents and Settings\PURMAH\Application Data\SAS\EnhancedEditor

 

File should be somewhere in a location like that. You'll likely have multiple folders and will have to find which one matches your previous session. Any session that crashes would have left files behind.

 

More details here:

http://support.sas.com/kb/12/392.html

 


@Lifang wrote:
I am using the enterprise environment. I will look into it. Thanks.

 

Lifang
Obsidian | Level 7

I did locate the EnhancedEditor folder but was not able to find the file there. I realized that I have saved the log of running most of the code before my computer shut down, so I was able to recover my code from the log. Thanks for your help. It would be nice to know why the original file turned blank.

Kurt_Bremser
Super User

EG does have a (bad) habit of destroying files when the connection to the storage is unreliable. I've witnessed several cases where .egp files were trashed that were opened on a workspace server, and where the connection died.

Similar things might happen if EG crashes fatally when it wants to rewrite a file's contents. File is already re-initialized, but further write fails.

ChrisNZ
Tourmaline | Level 20
EG also loses the connection with the server and becomes unusable at the first opportunity, such as if the wifi's signal strength drops a bit.It should be rewritten or taken behind the barn.
Kurt_Bremser
Super User

Might be a shortcoming in the IOM protocol that is not robust against short connection drops or timeouts.

 

When working from the home office, EG often loses connection to servers, while the venerable (in fact ANCIENT) X-Windows over an openssh tunnel never does experience more than a slight delay.

Lifang
Obsidian | Level 7
Okay, I see. So it happens sometimes.
ChrisNZ
Tourmaline | Level 20
A way to avoid losing programs is to store them in external text files rather than in egp project files.
This is much less required than with earlier versions of EG but still a good precaution.
Kurt_Bremser
Super User

@ChrisNZ wrote:
A way to avoid losing programs is to store them in external text files rather than in egp project files.
This is much less required than with earlier versions of EG but still a good precaution.

VERY solid advice. Everything important that I have created is stored as a .sas file on the server (AIX on top, so a VERY stable operating system).

Project files are always kept on internal desktop disks while I work on them. Only when I'm finished for the day I do copies to remote locations.

And I do "save early, save often". Every few lines of coding I hit the "store everything" button in EG.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 26 replies
  • 3409 views
  • 8 likes
  • 6 in conversation