Date: Tue, 4 Feb 1997 07:01:33 +0000
Reply-To: Roland Rashleigh-Berry <RolandRB@NETCOMUK.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Roland Rashleigh-Berry <RolandRB@NETCOMUK.CO.UK>
Organization: NETCOM Internet Ltd.
Subject: Re: Help need for a data _null_ problem
Content-Type: text/plain; charset=us-ascii
Jian-Zheng Zhou wrote:
>
> I have a problem which I do not understand why. I am appreciated that some
> one can give me a hint.
>
> %macro test(gtype=);
> data _null_;
> %if >ype=A %then
> call symput('GL',"Pen1");
> %else %if >ype=B %then
> call symput('GL',"Pen2");
> %else
> call symput('GL',"Pen3");
> ; /* I do not why I have to put ';' here
> otherwise I get error message said
> expect a ';' */
>
> run;
> %mend;
>
> %test(gtype=A);
>
> --
> Jian-Zheng Zhou
> Research Associate Tel: 301-405-1381(O)
> Department of Animal Sciences 301-590-0902(H)
> University of Maryland email:jz17@umail.umd.edu
> College Park, MD20742 coral@marlowe.umd.edu
Yes - the final ; is needed because the previous ;'s belong to the macro
lines. In other words they end the macro statement and are not part of
the standard SAS code.
RRB
|