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:56:33 -0400
Reply-To:     Ian Whitlock <WHITLOI1@WESTAT.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ian Whitlock <WHITLOI1@WESTAT.COM>
Subject:      Re: macro problem
Comments: To: Thomas_raffinot <traffinot@YAHOO.FR>
Content-Type: text/plain; charset="iso-8859-1"

Thomas,

Where does the parameter DATE come from? If it is a SAS date then convert it with

%if &date<= %then %sysfunc(inputn(06feb1994,date9.)) %do;

If DATE is really of the form ddmmmyyyy then use the same trick on the left hand side of the comparison.

IanWhitlock@westat.com

-----Original Message----- From: Thomas_raffinot [mailto:traffinot@YAHOO.FR] Sent: Thursday, July 31, 2003 3:17 AM To: SAS-L@LISTSERV.UGA.EDU Subject: macro problem

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