For the, the most useful techniques for avoiding macros are:
- Using PROC SQL with the :INTO clause to generate code.
- Using BY groups.
- Using CALL EXECUTE to write data-dependent code.
- Using PUT to write data dependent code to a temporary file, then
%INCLUDEing that file.
Manager, Technical Development
Metrics Department, First Health
West Sacramento, California USA
>>> "Chang Y. Chung" <chang_y_chung@HOTMAIL.COM> 06/11/2004 2:32 PM
On Thu, 10 Jun 2004 15:45:39 +0000, Ian Whitlock <iw1junk@COMCAST.NET>
>... If you like the simplicity just avoid writing
>macros. Having no parameters does make code simpler, albeit
I totally agree with you on that it is wonderful that sas keep things
that things work even after two decades of upgrades.
With all the due respect, however, I guess I disagree on three points.
One: the lack of parameters can be readily overcome:
macro _line "this is a test line" %
macro _line "another test line" %
Two: name conflicts are not completely disappeared with modern-style
macros, either -- and can be avoided by applying styles or guidelines
strictly, also as shown above. And finally, I would like to avoid
if I can. Maybe it is just me, but as long as I am to be proficient in
sas, there seems to be no way avoiding macros. I would love to hear
ways to not using macros.