*How do I recover a file?
I am learning SAS using University SAS Studio and I came across the following problem. The eu_occ table that is part of the PG1 library of the Essentials 1 course is only showing the Country and Geo columns:
*Run pg1.eu_occ;
data pg1.eu_occ2;
set pg1.eu_occ;
run;
Using statements suggested by Roger Dean:
*Statements by Roger Dean;
data WORK.EU_OCC;
infile datalines dsd truncover;
input Geo:$2. Country:$40.;
label Geo="Country Code" Country="Reporting Country";
datalines;
AT Austria
AT Austria
AT Austria
AT Austria
AT Austria
;;;;
NOTE: There were 5 observations read from the data set PG1.EU_OCC.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
250
251 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
263
How can I recover the original file? It is necessary for other stages of the course.
I have tried to create a new library, called PG2 but it just makes a copy of PG1.
Any suggestions?
Thank you very much, I managed to recover the original file using Windows.
Thanks for the tip.
@ed_sas_member wrote:
Hi @JohnWeyk
In addition to @Reeza 's answer, you can put access=readonly in the libname statement to avoid this kind of issue.
libname pg1 "&path./data" access=readonly;
I think the course requires you to write to that library periodically though?
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.