I am struggling to use macro variables within a macro.
For example:
%LET Run_dt = 31Mar2019;
%LET Report=%SYSFUNC(INTNX(MONTH,"&run_dt."d,0,e),DATE9.);
%LET start=%SYSFUNC(INTNX(MONTH,"&run_dt."d,-11,e),DATE9.);
%put &Report. &start.;
The Log will show
31MAR2019 30APR2018
But I would like to do this within a Macro (there will be part of something larger within the macro I'm not doing it without reason :))
Like this;
%Macro wont_work;
%LET Report=%SYSFUNC(INTNX(MONTH,"&run_dt."d,0,e),DATE9.);
%LET start=%SYSFUNC(INTNX(MONTH,"&run_dt."d,-11,e),DATE9.);
%Mend wont_work;
%month_prov;
This as I'm sure you know doesn't give me the results I want!
Please can someone explain my error to me?
Thankyou!