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 (December 2010, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 29 Dec 2010 10:16:56 -0800
Reply-To:     Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject:      Re: Fun With SAS - My Vote for Oddest SAS Programming Language
              "Feature"
Comments: To: Michael Raithel <michaelraithel@WESTAT.COM>
In-Reply-To:  <037AB3FF38D44C4BAFB5DFF3D06B57BAA6C6F14F@EX-CMS01.westat.com>
Content-Type: text/plain; charset=us-ascii

I don't consider the EXCHANGE statement to be particularly odd. Opinions vary, happily.

What I consider the oddest and most inexplicable feature of SAS is that MISSING is not the default in REPORT, SUMMARY, MEANS, TABULATE, FREQ, and probably other places.

The default shouldn't be to throw away data silently.

On Dec 29, 2010, at 5:39 , Michael Raithel wrote:

> Dear SAS-L-ers, > > Each and every one of us who eats, drinks, breathes, sleeps, and dreams SAS programming has one. It's that one feature of SAS that we think is kind of... is very... is somewhat... well, odd. It could be an option, a format, an informat, a function, a call routine, a statement, a PROC, etc. but it exists and we scratch our heads and wonder why. > > If you can relate to this, let the list know your own vote for the oddest SAS programming language feature. > > Here is one of mine: > > The EXCHANGE statement on PROC DATASETS swaps the names of two SAS data sets. So, if it were executed against NEWFILE and OLDFILE, the name of NEWFILE would be changed to OLDFILE and the name of OLDFILE would be changed to NEWFILE. Consequently, the names of the two files would be exchanged. And, it would happen in the flashing blur of a nanosecond! > > Here is an example: > > proc datasets library=work nolist; > exchange newfile = oldfile; > run; > quit; > > In this example, we exchange the names of the NEWFILE and OLDFILE data sets. The contents of each data set remains the same; it is just that they got a name change. > > The EXCHANGE statement always reminds me of the Metamorphosis Illusion (http://en.wikipedia.org/wiki/Metamorphosis_(illusion) ). I think that in the unlikely event that I ever use it in one of my programs, I will watch it very, very closely to see if I can discern exactly how the trick is done:) > > Happy New Year to one and all! > > I hope that this suggestion proves helpful now, and in the future! > > Of course, all of these opinions and insights are my own, and do not reflect those of my organization or my associates. All SAS code and/or methodologies specified in this posting are for illustrative purposes only and no warranty is stated or implied as to their accuracy or applicability. People deciding to use information in this posting do so at their own risk. > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > Michael A. Raithel > "The man who wrote the book on performance" > E-mail: MichaelRaithel@westat.com > > Author: Tuning SAS Applications in the MVS Environment > > Author: Tuning SAS Applications in the OS/390 and z/OS Environments, Second Edition > http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=58172 > > Author: The Complete Guide to SAS Indexes > http://www.sas.com/apps/pubscat/bookdetails.jsp?catid=1&pc=60409 > > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ > One man's "magic" is another man's engineering. "Supernatural" is a null word. - Robert A. Heinlein > +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++


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