NOTE: Line generated by macro function

Reply
Frequent Contributor
Posts: 121

NOTE: Line generated by macro function

 

I have the split macro below that I have been trying to run unsuccesfuly because I get the following error; NOTE: Line generated by the macro function "I." I have tried some solutions I found online, but I really think that I'm missing smth very obvious; could someone please take a look and let me know what they think? The in.cur_mod2 dataset has 59,325 observations and I am trying to split it into smaller datasets.

 

Thanks in advance.

 

 

options mlogic mprint symbolgen;

%macro split(num);

 

data _null_;

if 0 then set in.cur_mod2 nobs=count;

call symput('numobs',put(count,8.));

run;

%let n=%sysevalf(&numobs/&num,ceil);

data %do J=1 %to # orig_&J %end;;

set in.cur_mod2;

%do I=1 %to #

if %eval(&n*(&i-1))<_n_<=%eval(&n*&I)

then output in.cur_mod2_&I;

%end;

run;

%mend;

%split(10);

 

Super User
Posts: 17,912

Re: NOTE: Line generated by macro function

Don't. 60,000 records is trivial for SAS and whatever reason you have for splitting the file can be accomplished in another manner. 

 

Super User
Posts: 17,912

Re: NOTE: Line generated by macro function

Also, in general, post more of your log, from start to error at least. 

Super User
Posts: 5,093

Re: NOTE: Line generated by macro function

The data set names in your DATA statement do not match the names in your OUTPUT statement.

 

That may be a separate issue since it does not seem related to the error message you are getting.

 

That message might imply that one variation of your code included something like %i(........)

 

Ask a Question
Discussion stats
  • 3 replies
  • 258 views
  • 3 likes
  • 3 in conversation