LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2008, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 29 Jul 2008 09:36:57 -0400
Reply-To:     Bucher Scott <SBucher@SCHOOLS.NYC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Bucher Scott <SBucher@SCHOOLS.NYC.GOV>
Subject:      Re: tip: Macro Design Checklist
In-Reply-To:  A<482249F865060740AE33815802042D2F01643D00@LTA3VS012.ees.hhs.gov>
Content-Type: text/plain; charset="us-ascii"

I use positional parameters with macro functions that I use frequently and that have arguments that are few and relatively intutitive, e.g. %wordcount(). If the macro functions has more than 3 arguments, I use a combination of positional parameters and keyword parameters with default values. I think the examples cited within the sasautos library were also macro functions.

Regards, Scott Bucher

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Fehd, Ronald J. (CDC/CCHIS/NCPHI) Sent: Tuesday, July 29, 2008 9:05 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: tip: Macro Design Checklist

> From: RolandRB > > On Jul 28, 10:06 pm, r...@CDC.GOV ("Fehd, Ronald J. (CDC/CCHIS/ > NCPHI)") wrote: > > I have updated my Macro Design Checklist page > > > > http://www.sascommunity.org/wiki/Macro_Design_Issues_Checklist > > Your first tip is "always use named parameters".

> This is a bad general tip to give

My 20 years experience says otherwise.

> as it depends on the circumstances.

imnsho, those circumstances are usually that the macro is in a program.

\begin{quote} Note: These recommendations are for project and site macros, i.e. macros not in a program, but in separate files. \end{quote}

> The SAS Institute > itself does not follow this recommendation.

<sigh> yes, I know. From my perspective on the HelpDesk SAS Institute creates more problems for itself and its customers by publishing Reeeeally! Bad Examples both in OnLine Doc, paper manuals, and training courses.

> Check out the %trim and > %left macros that they distribute with their sasautos library.

There are 500 macros provided in 300 files in 13 folders in the sasautos library. The only thing that I would recommend about them is that they have a fairly consistent header for their documentation.

Ron Fehd the documentation maven and the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov


Back to: Top of message | Previous page | Main SAS-L page