DATA Step, Macro, Functions and more

ERROR: File WORK.YEAR.DATA does not exist

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 129
Accepted Solution

ERROR: File WORK.YEAR.DATA does not exist

Hi,

 

I cannot figure out why this is being generated. Everything looks ok to me.

------------------------------------

First, here is the learn.errors file:

libname Learn '/folders/myfolders/Learn' ;

data learn.errors;
   input Subj : $3.
         PartNumber $8.
         Name & $20.;
datalines;
001 L1232 Nichole Brown
0a2 L887X Fred Beans
003 12321 Alfred 2 Nice
004 abcde Mary Bumpers
X89 8888S Gill Sandford
;

 

Second, here is the code that is giving me a 'file mixed_data.data does not exist' error:

 

libname Learn '/folders/myfolders/Learn' ;

Data Check1 ;
    Set Learn.Errors ;
    If anyalpha(Subj) then output mixed_data ;
    else output only_nums ;
run ;

proc print data=mixed_data noobs ;
run ;;

 

--------------------

In my understanding, the anyalpha(subj) should produce a file with the datalines from the learn.errors set in which the Subj has letters in it. Why is this creating this error?

 

Thanks!


Accepted Solutions
Solution
‎11-27-2017 09:25 PM
Super User
Posts: 23,682

Re: ERROR: File WORK.YEAR.DATA does not exist

Posted in reply to ManitobaMoose

Output data sets need to be named on the DATA statement. 

 

Data mixed_data only_nums;

View solution in original post


All Replies
Solution
‎11-27-2017 09:25 PM
Super User
Posts: 23,682

Re: ERROR: File WORK.YEAR.DATA does not exist

Posted in reply to ManitobaMoose

Output data sets need to be named on the DATA statement. 

 

Data mixed_data only_nums;
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 463 views
  • 0 likes
  • 2 in conversation