| Date: | Wed, 29 Dec 2010 18:53:38 +0000 |
| Reply-To: | "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU> |
| Sender: | "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU> |
| From: | "Keintz, H. Mark" <mkeintz@WHARTON.UPENN.EDU> |
| Subject: | Re: Fun With SAS - My Vote for Oddest SAS Programming Language
"Feature" |
|
| In-Reply-To: | <037AB3FF38D44C4BAFB5DFF3D06B57BAA6C6F14F@EX-CMS01.westat.com> |
| Content-Type: | text/plain; charset="us-ascii" |
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
> +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|