Date: Fri, 25 Sep 2009 15:46:38 -0500
Reply-To: "Data _null_;" <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Data _null_;" <iebupdte@GMAIL.COM>
Subject: Re: SAS drove me crazy! Please help me!
In-Reply-To: <58997c8c-7ec6-48a1-a000-9292bb6da440@o13g2000vbl.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Look up ROUND function and read this and see modification to your
program to help you "see" the inequality.
http://support.sas.com/techsup/technote/ts654.pdf
data temp;
input drugcost :8.2 amtpaid :8.2;
cards;
17.06 12.06
42.08 37.08
11.36 6.36
21.88 16.88
130.92 125.92
;
run;
data test1;
set temp ;
copay=drugcost-amtpaid;
if copay=5 then mark=1; else mark=0;
retain five 5;
run;
proc print;
format _numeric_ hex16.;
run;
On 9/25/09, Ruby <windofoct@gmail.com> wrote:
> Hi SAS experts,
>
> I extracted my findings from my dataset. I did a simple mathematics
> here and the results should be all 5s. However SAS doesn't think so.
> What the hell is!
>
>
> data temp;
> input drugcost :8.2 amtpaid :8.2;
> cards;
> 17.06 12.06
> 42.08 37.08
> 11.36 6.36
> 21.88 16.88
> 130.92 125.92
> ;
> run;
>
> data test1;
> set temp ;
> copay=drugcost-amtpaid;
> if copay=5 then mark=1; else mark=0;
> run;
>
>
> Thanks all,
>