Date: Wed, 20 Aug 2008 16:56:33 -0400
Reply-To: Sigurd Hermansen <SigurdHermansen@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Sigurd Hermansen <SigurdHermansen@WESTAT.COM>
Subject: Re: Exact values from SAS variables not showing as matching
In-Reply-To: <62432006F5965C42BAEC4EA29286EE0507AB2D2D71@EX-CMS01.westat.com>
Content-Type: text/plain; charset="us-ascii"
Here's an interesting variant on anomalies in matching of SAS variables that I began writing as part of a response to another question:
data test;
do i=1 to 1E5;
j=ranuni(0)*1000;
output;
end;
proc means data=test noprint;
var j;
output out=mean mean=mean;
run;
proc sql;
create table testSubset as
select i,(ranuni(0)*1000) as j from test
where i>j
;
quit;
It took me a while to discover why the program generates apparently incorrect results. You will likely see the reason immediately. If not, I'll explain after others have a chance to test the program and diagnose why it doesn't work as one might expect at first glance.
S
|