*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?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.