Good morning,
Here is the macro variables I created but I got error message and I am not sure why? Could you please help? Thank you! Y
ERROR: The %DO statement is not valid in open code.
[/prep]
%let org_date = "16Dec2009"d;
%let calendar_mn = 3;
%macro get_all;
%do increm=1 %to &calendar_mn %do;
data cal_date;
decrem=&increm-1;
if decrem=0 then beg_date = &org_date;
else beg_date = intnx('month', &org_date, decrem );
end_date = intnx('month', &org_date, &increm );
call symput("beg_date", compress(put(beg_date, 11.)));
call symput("end_date", compress(put(end_date, 11.)));
run;
%end;
%mend get_all;
%get_all
[/prep]