Date: Fri, 15 Jun 2007 10:43:38 -0400
Reply-To: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE>
Subject: Re: mistakes in SAS that don't generate errors
That's like in any programming languages, you get always that what you
wrote, not what you want!
I saw a few days ago a very dangerous thing:
in SAS the logical AND can be written as &
Unfortunately that's also a macro-trigger. So one must be very careful
with blanks (or not blanks!).
Nice things are also, forgetting a ;
On Fri, 15 Jun 2007 09:16:29 -0500, SAS_learner <proccontents@GMAIL.COM>
>Great thread John, it is very interesting to know more about these things.
>Are there any thing similar in Macro world .
>On 6/15/07, email@example.com <firstname.lastname@example.org> wrote:
>> I'm looking for ways to produce unexpected results in SAS that don't
>> generate an error or warning message. Your syntax is fine, it works as
>> SAS intended but not as you intended. Three examples:
>> * Inadvertantly respecify a user-defined format. (This does generate a
>> note to the log that an existing format has been overwritten but
>> that's easy to overlook).
>> * Using a "numbered range list" in a function, e.g. "sum(x1-x5)". This
>> will calculate the sum of x1 minus x5, "sum(of x1-x5)" caculates the
>> sum of x1 to x5.
>> * Forgetting that missing values are represented by minus infinity in
>> Are there other nice examples of SAS syntax that looks like it does
>> what you want it to at first glance or with insufficient coffee?
>> John Hendrickx