I'm new to this forum. Can you advise how to create a month/year variable using a macro? I have individual monthly files that I will merge together to look at trends. However when I try the code below, I either get missing data or if I turn it into a character variable, the "&i." becomes the variable. I'd appreciate any guidance you can send my way. Thanks!
%macro date;
%do i = 4 %to 12;
data total_&i._2009;
set tier.total_&i._2009;
date = &i._2009;
%end;
run;
%mend date;
%date
... View more