Hi everyone,
I keep running into this issue:
I've gone through all the steps of creating a data set, I've used a libname statement, I try to save the new data to my folder and I get the error that: ERROR: File THESIS.AIM1.DATA is not a SAS data set.
Code looks like this:
libname thesis 'C:\Users\name\Documents\Dissertation\Data';
/****** lots of data manipulation to create clean data set ****/
/***** EXPORT AIM1 DATA *****/
data thesis.Aim1;
set work.aim1;
run;
And then I get the error. I should add, the work file is just fine and can be used for analysis with no issue. So why won't it save to my computer folder?
Thanks in advance!
data thesis.Aim1; set work.aim1; run;
Examine whether work.aim1 is a correct SAS Data Set. You may just use proc print to print few records or use put statement.
proc print shows me exactly what I would expect to see from a data set.
Did the LIBNAME statement really work? Are you running SAS on your laptop? If SAS is running on some other server or you are using SAS University Edition that runs in a virtual machine then you will not be able to see your C drive from within the SAS program.
This is what happens when I run the libname:
14385 DM log 'clear';
14386 DM out 'clear';
14387
14388 libname thesis 'C:\Users\name\Documents\Dissertation\Data';
NOTE: Libref THESIS refers to the same physical library as LIWONDE.
NOTE: Libref THESIS was successfully assigned as follows:
Engine: V9
Physical Name: C:\Users\name\Documents\Dissertation\Data
14389 data thesis.Aim1;
14390 set work.aim1;
14391 run;
ERROR: File THESIS.AIM1.DATA is not a SAS data set.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
I'm running the program on my laptop without using an outside server and it's not university edition.
ERROR: File THESIS.AIM1.DATA is not a SAS data set.
It must be THESIS.AIM1
see why you are not getting so.
Check if you already have a file with that name. Not sure why SAS would care since you blowing it away.
For example try running proc contents on it.
Or look at it from the operating system.
If there is a file then remove it.
Did you notice the message about your new libref duplicating an existing one? Perhaps you already have that dataset open another window and the real issue is with removing the old version and the error message is just confusing.
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.