Date: Fri, 1 Dec 2006 10:20:57 -0500
Reply-To: Jake Bee <johbee@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jake Bee <johbee@GMAIL.COM>
Subject: Re: macros migrated form mainframe to unix
In-Reply-To: <1164986068.286886.98780@l12g2000cwl.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Migration to UNIX can give you problems, you may lose or acquire unseen
characters such as crtl-z. I think you want the percents back. In my
migrations to UNIX I never lost the %, not sure how that happened for your
migration, but you will need them, I would try another migration
route/method, rather than try to figure out where all of the %'s should be.
On 12/1/06, Andre <andrzej_ka@wp.pl> wrote:
>
> Hi,
>
> 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?
>
> regards
> Andre
>
> %MACRO UTA;
> .
> .
> .
>
> %IF &INDICA = 1 %THEN %DO;
>
> DATA TASSI_PAESE;
>
> 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;
>
> SET TASSI_PAESE;
>
> DURATA=0;
>
> IF TIP0='Y' THEN DURATA=DURATA+365*DUR0;
>
> ELSE IF TIP0='M' THEN DO;
>
> MCORR=&IMLM;
>
> DO II=1 TO DUR0;
>
> DURATA=DURATA+MESI(MCORR);
>
> MCORR=MCORR+1;
>
> IF MCORR GT 12 THEN MCORR=MCORR-12;
>
> END;
>
> END;
>
> %END;
>
> .
> .
> .
> %MEND UTA;
>
|