Date: Fri, 1 Dec 2006 03:34:35 GMT
Reply-To: Paula Sims <paulasims2004@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Paula Sims <paulasims2004@HOTMAIL.COM>
Organization: SBC http://yahoo.sbc.com
Subject: Evaluating an IF/THEN in the negative?
Hi everyone,
I came across an interesting "issue" last week and was wondering why it
worked one way but not the other.
Here's a bit 'o the code:
IF (MISSING(VAR1) = 0 OR VAR1 NE 0) THEN RESULT1 = ABC/VAR1; ELSE
RESULT1 = 999999999999999;
The evaluation worked correctly for the MISSING part but not for the
VAR1 NE 0. However, I adjusted the code to
IF (MISSING(VAR1) OR VAR1 = 0) THEN RESULT1 = 999999999999999; ELSE
RESULT1 = ABC/VAR1;
and everything thing worked wonderfully every time in both situations.
Why???
Thanks
Paula