Date: Fri, 1 Dec 2006 15:30:16 +0000
Reply-To: toby dunn <tobydunn@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: toby dunn <tobydunn@HOTMAIL.COM>
Subject: Re: macros migrated form mainframe to unix
Content-Type: text/plain; format=flowed
You need to distinguish between what is part of the MAcro conditional logic
and what is part of the Data Step conditional logic. Only the Macro's
conditional Logic need to have the % tokiens in front.
Quickly, bring me a beaker of wine, so that I may wet my mind and say
Wise people, even though all laws were abolished, would still lead the same
You should not decide until you have heard what both have to say.
From: Andre <andrzej_ka@WP.PL>
Reply-To: Andre <andrzej_ka@WP.PL>
Subject: macros migrated form mainframe to unix
Date: Fri, 1 Dec 2006 07:14:28 -0800
I have .sas program recently migrated from mainframe machine to unix
and some part of the code came to my attention ....there is no %
characters before IF ..ELSE ..THEN DO.. END statements
I know % character is not used in SCL macro, but I do not know if it is
correct to omit % in .sas macro? ...
There is no errors when running that program.
Is IF .. ELSE .. END treated as local condition and is totally correct
in a macro?
%IF &INDICA = 1 %THEN %DO;
RETAIN M1 31 M2 28 M3 31 M4 30 M5 31 M6 30
M7 31 M8 31 M9 30 M10 31 M11 30 M12 31;
ARRAY MESI(12) M1-M12;
IF TIP0='Y' THEN DURATA=DURATA+365*DUR0;
ELSE IF TIP0='M' THEN DO;
DO II=1 TO DUR0;
IF MCORR GT 12 THEN MCORR=MCORR-12;
View Athlete’s Collections with Live Search