BookmarkSubscribeRSS Feed
OzanKirtac
Fluorite | Level 6

Hi All

 

I was working on a SAS data file attached but after I saved it yesterday. I cannot re-open the data file. When I open it, it say no observations but there were observations. 


Any help on what might have happenned I attach the data file.

 

Many thanks

4 REPLIES 4
Kurt_Bremser
Super User

So you did something that removed all observations. We would need to see the code you ran in order to diagnose what happened.

But for now, you can only re-import the data from the original source once again.

 

BIG hint: never overwrite a dataset in one step, like

data x;
set x;
....
run;

Always create a new dataset, and only overwrite the original once you have verified the operation was successful.

I myself do not overwrite any intermediate datasets, I always keep them until the termination of the SAS session deletes the WORK location. Datasets in permanent libraries are only overwritten when: see above.

OzanKirtac
Fluorite | Level 6

I used save as to save the file in work folder to perm folder. Then I might have saved on it from the menu number of times. So this is unrecoverable right?

Kurt_Bremser
Super User

Unless you have a backup at hand from which to restore a previous version of a given file, there is nothing you can do except recreate the dataset from the beginning.

Reeza
Super User
You don't usually use Save As to save data sets, you use it to save SAS programs, to save data sets you use a libname statement in a program.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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