Alternately, use the %Sysfunc() macro function in a %Let statement to permit use of non macro functions such as INTNX(). Note that the macro language is essentially a text language so wuoting of constants is not required - cf month, b and e below. Also, you need to use putn() or putc() with %Sysfunc - I have added quotes and a trailing D to convert BPR and EPR to SAS date literals (which do require quotes - double in this instance to allow macro resolution. Richard %LET BPRD = %Sysfunc(intnx(month, %Sysfunc(today()),-1,b)); %LET EPRD = %Sysfunc(intnx(month, %Sysfunc(today()),0,e)); %LET BPR = "%Sysfunc(putn(&BPRD,DATE9))"D; %LET EPR = "%Sysfunc(putn(&EPRD,DATE9))"D;
... View more