Date: Thu, 28 Jan 1999 10:06:24 -0500
Reply-To: "Patton, Nancy (CAP, RFS)" <Nancy.Patton@GECAPITAL.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "Patton, Nancy (CAP, RFS)" <Nancy.Patton@GECAPITAL.COM>
Subject: Re: Semicolon to end a macro call?
Content-Type: text/plain; charset="iso-8859-1"
Brian,
There would be a very good reason not to use a semi-colon in a macro call,
but as it turns out most of the time I do use a semicolon it is redundant.
But by using a semicolon the code looks cleaner!
For example, here I use macros to generate the SAS data set names and keep
statements- a semicolon would be fatal in %BKO! The semi after %DS is the
semi to end the SAS data statement (because there is no semi-colon generated
from within the macro.)
DATA %BKO
%DS ;
resolves to:
DATA sas1.data (keep= client amount sales) sas2.data (keep=branch
clientnam sales returns) ;
Hope this helps!
-Nancy
g GE Capital
________________________________
GE Capital Card Services
Nancy K. Patton
Senior Risk Analyst
RISK MANAGEMENT GROUP
General Electric Capital Corporation
805 S. Courthouse Road, Arlington, VA 22204-2104
<mailto:Nancy.Patton@GECAPITAL.COM>
-----Original Message-----
From: Brian Rosson [mailto:brosson@VOYAGER.NET]
Sent: Wednesday, January 27, 1999 8:19 PM
To: SAS-L@UGA.CC.UGA.EDU
Subject: Semicolon to end a macro call?
When calling a macro I thought it was proper SAS code to not use a
semicolon. When reading SAS Macro Tips and Techniques, about 50% of the
time the programmer used a semicolon to end a macro call. Example:
%macro test;
....<code here>...
%mend test;
%test <no semicolon>
%test; <semicolon>
These contributions to this book were from SUGI 14 through 18 so I assume
(maybe mistakenly) that these programmers know what they're talking about
and would not use sloppy or incorrect code. What would be the reason for
use a semicolon after a macro call? Any comments, thoughts or suggestions
are welcome.
Thank you,
Brian Rosson
Parke-Davis Pharmaceutical Research
Ann Arbor, Michigan
|