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 (February 2004, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 5 Feb 2004 13:56:53 -0500
Reply-To:     "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Fehd, Ronald J. (PHPPO)" <rjf2@CDC.GOV>
Subject:      Re: %squeeze macro
Comments: cc: "Chang Y. Chung" <chang_y_chung@HOTMAIL.COM>
Content-Type: text/plain; charset="us-ascii"

My sentiments exactly. Too often SAS documentation as well as SAS employee papers provide us examples of programming reeeeally badly!

Well, for ideas and cut&paste of various lines of code the examples work and that may be acceptable, but, on the whole, ... I'll quote my favorite LaTeX warning: "Badness happening" |-(

Ron Fehd the macro maven CDC Atlanta GA USA RJF2@cdc.gov

Efficiency is intelligent laziness. -David Dunham ... but let's not get carried away by such swiftness.

> From: Chang Y. Chung [mailto:chang_y_chung@HOTMAIL.COM]

> It may be just me, but sometimes I feel that some part of SI > is completely out of sink with other parts that does a great > job. For example, SAS Certification web page has such a bad > example of the Certification Exam questions as we discussed > it a little bit before in sas-l. Today, I received a monthly > newsletter called EDUmation. One of its features is about > this new macro called %squeeze -- I checked it out and I > think it could be much improved. In fact, as it is (even > though it seems to be the second version), it is just a bad > example of how to program a macro. > > For example:(1)it has two required parameters called DSNIN > and DSNOUT. I am not sure the reason why they are not called > DATA= and OUT=, as in most of the procedures; (2)In the > middle of the source, it creates N_CHAR and N_NUM variables. > It could be %local'ed to be safer; (3)It uses "set nobs=" > method to check if the input dataset has any observations at > all; (4)In the middle of the macro source, you realize that > this macro creates potentially a lot of global variables, > which are not documented at all at the header, even though it > has four different NOTE's. This is just a beginning. In > summary, this is not a good example of macro programming. Why > feature it at the newsletter? Or is it just me? :-) > > Cheers, > Chang >


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