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 (August 2008, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 11 Aug 2008 11:35:26 -0500
Reply-To:   Mary <mlhoward@avalon.net>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Mary <mlhoward@AVALON.NET>
Subject:   Re: OT: Monday/Macro Humor
Comments:   To: "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Content-Type:   text/plain; charset="iso-8859-1"

Also, I wouldn't need the %if so much were it not for SAS's ODS implementation, where ODS data sets are sometimes not created even if one requests them (i.e., the procedure did not run or that particular output was not appropriate for the run), and that they are different depending on the run (such as odds ratios, etc.), and also can be "left over" from the previous run if SAS decided it didn't need to create it for some of the reasons above; but since the ODS is like that, I need the %if statement to make sure ODS output is there before attempting to refer to it.

I use the %do loops to exectute the same code multiple times- either for multiple runs, or for by loop outputting of Excel tagsets where I want to change the sheetname each time.

-Mary ----- Original Message ----- From: Mary To: Fehd, Ronald J. (CDC/CCHIS/NCPHI) ; SAS-L@LISTSERV.UGA.EDU Sent: Monday, August 11, 2008 11:29 AM Subject: Re: OT: Monday/Macro Humor

I would use them less if there was a way to use the %if and %do statements without being in a macro wrapper- being able to pass in parameters is another reason but lately I've been loading up data sets with my various runs rather than doing this, so it is really the %if and %do statements that requires code to be macros rather than includes.

-Mary ----- Original Message ----- From: Fehd, Ronald J. (CDC/CCHIS/NCPHI) To: SAS-L@LISTSERV.UGA.EDU Sent: Monday, August 11, 2008 10:57 AM Subject: OT: Monday/Macro Humor

A Little Birdie wrote and asked my opinion.

Why do I use macros for repetitive tasks?

* %if * %do * hide complexity

After 20 years of programming in SAS my mind is having a Senior Moment. Are there other reasons?

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


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