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
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.
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?
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.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.
Ready to level-up your skills? Choose your own adventure.