Hello, I've built a macro that will merge the values of a data set and create a new data set with an updated name. I'm trying to return the name in the macro, but it is throwing a couple errors. The errors occur on the merge statement and on the last return statement. I'm not sure why since if I remove the return statement everything works. But, the second I add it in, these two errors reappear. Any suggestions would be appreciated. /* Build Data */ data scores; input Name $ Test_1 Test_2 Test_3; datalines; Bill 187 97 103 Carlos 156 76 74 Monique 99 102 129 ; data scores_post; input Name $ Test_1 Test_2 Test_3; datalines; Bill 23 14 61 Carlos 51 23 44 Monique 13 812 43 ; %let num = 0; %macro update_info(old,new); %global num; %let num = %eval(&num.+1); %let new_name = &new._&num.; /* Update information */ data &new_name.; merge &old. &new.; run; /* Return new dataset name */ &new_name. %mend; %let catch = %update_info(scores,scores_post);
... View more