BookmarkSubscribeRSS Feed
EpiNovice
Calcite | Level 5

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!

 

 

6 REPLIES 6
KachiM
Rhodochrosite | Level 12
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.

EpiNovice
Calcite | Level 5

proc print shows me exactly what I would expect to see from a data set.

Tom
Super User Tom
Super User

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.

EpiNovice
Calcite | Level 5

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.

KachiM
Rhodochrosite | Level 12

ERROR: File THESIS.AIM1.DATA is not a SAS data set.

 

It must be THESIS.AIM1

see why you are not getting so.

Tom
Super User Tom
Super User

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.

 

 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 2751 views
  • 0 likes
  • 3 in conversation