BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ManitobaMoose
Quartz | Level 8

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!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

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

 

Data mixed_data only_nums;

View solution in original post

1 REPLY 1
Reeza
Super User

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

 

Data mixed_data only_nums;

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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