Hi Guys,
I have a question regarding SAS macro %IF %Then Syntax;
I know %If condition %then action; works
but once I have mutiple if within if/elseif,
do i have to have add %do; and %End; ?
I am converting access macro code into sas macro,
so i prefer not to add the %do & %end
Thanks,
The following is my macro,
and I have error
ERROR: There is no matching %IF statement for the %ELSE. A dummy macro will be compiled.
%Macro PoolAdj(effdate= ,State= ,Lives= );
%let PoolAdj = 1;
%IF &effdate ^= "?" %then
%IF &state ^= "FL" And &state ^= "NY" %then
%IF &effdate > '06Jun2004' %then
%IF &lives < 10 %then
&PoolAdj = &PoolAdj * 1;
%else %if &lives < 500 %then
&PoolAdj = &PoolAdj * 0.95;
%else
&PoolAdj = &PoolAdj * 0.97;
;
%else %if &effdate > '09May2002' %then
%IF &lives < 10 %then
&PoolAdj = &PoolAdj * 1;
%else %if &lives < 500 %then
&PoolAdj = &PoolAdj * 0.95;
%else
&PoolAdj = &PoolAdj * 0.97;
;
;
;
%Mend PoolAdj;
Message was edited by: fortrichmond