LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2003, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 31 Jul 2003 10:11:45 +0100
Reply-To:     Roland <roland@RASHLEIGH-BERRY.FSNET.CO.UK>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Roland <roland@RASHLEIGH-BERRY.FSNET.CO.UK>
Organization: Universe Monitors
Subject:      Re: macro problem

You can only compare dates like that in native SAS code. They are just strings of characters to macro code.

"Thomas_raffinot" <traffinot@yahoo.fr> wrote in message news:91e0562d.0307302316.572d0b9d@posting.google.com... > I have a macro. ther's no message error but this macro doesn't work. I > don't know why. > %macro taux(date); > %if &date<='06feb1994'd %then %do; > %let gam=%sysevalf(0.06/12); %let gamprim=%sysevalf(0.0462/12); > %end; /*taux à 6%*/ > %else %if '07feb1994'd<=&date<='22jan1997'd %then %do; > %let gam=%sysevalf(0.0525/12); %let gamprim=%sysevalf(0.0384/12); > %end;/*taux à 5.25%*/ > %else %if '23jan1997'd<=&date<='08jun1998'd %then %do; > %let gam=%sysevalf(0.0425/12) ; %let gamprim=%sysevalf(0.031/12); > %end;/*taux à 4.25%*/ > %else %if '09jun1998'd<=&date<='25jul1999'd %then %do; > %let gam=%sysevalf(0.04/12); %let gamprim=%sysevalf(0.029/12); > %end;/*taux à 4%*/ > %else %if '26jul1999'd<=&date<='30jun2000'd %then %do; > %let gam=%sysevalf(0.036/12); %let gamprim=%sysevalf(0.0261/12); > %end;/*taux à 3.60%*/ > %else /*%if '01jul2000'd<=&date %then */%do; > %let gam=%sysevalf(0.045/12) ; %let gamprim=%sysevalf(0.0327/12); > %end;/*taux à 4.50%*/ > %mend;


Back to: Top of message | Previous page | Main SAS-L page