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 14:00:11 -0500
Reply-To:     Suzanne McCoy <Suzanne.McCoy@CATALINAMARKETING.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Suzanne McCoy <Suzanne.McCoy@CATALINAMARKETING.COM>
Subject:      Re: Fun With SAS - My Vote for Oddest SAS Programming Language
              "Feature"
Comments: To: "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU>
In-Reply-To:  <E0B423A8C0D1E74B8905B2C5CB38C1AF0FBDE3@GENO3.wharton.upenn.edu>
Content-Type: text/plain; charset="us-ascii"

Yep, I have to look up the syntax on these two every time. Scan and index functions too.

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Keintz, H. Mark Sent: Wednesday, December 29, 2010 1:54 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Fun With SAS - My Vote for Oddest SAS Programming Language "Feature"

As an example of odd (as in inconsistent), how about:

TRANSLATE function using the argument sequence translate(source,replacement,target) while TRANWRD uses tranwrd(source,target,replacement)

regards, Mark

> -----Original Message----- > From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of > Michael Raithel > Sent: Wednesday, December 29, 2010 8:40 AM > To: SAS-L@LISTSERV.UGA.EDU > Subject: Fun With SAS - My Vote for Oddest SAS Programming Language > "Feature" > > 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