Date: Tue, 24 Mar 2009 14:58:12 -0400
Reply-To: msz03@albany.edu
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mike Zdeb <msz03@ALBANY.EDU>
Subject: Re: reducing the length of numeric variable
Content-Type: text/plain;charset=iso-8859-1
hi ... OK, let's beat this to death since I'm curious
given that the problem was ...
****************************************************
My cov_4 variable looks like: cov_4 2.3164977635316 3.1546584777797 4.4646674776444 5.1646466797979
I want it to look like: cov4 2.316 3.154 4.464 5.164
I want to do this because I want to use the output file by some other software.
****************************************************
I was wondering how the suggestion to use a format ("see the format statement.")
would work given that numbers are not ROUNDED
(for example, 3.1546584777797 is supposed to end up as 3.154)
I thought one would have to use a FLOOR or INT function to actually change the value of the variable
prior to writing to a file given that any W.D format would ROUND the value and there's no numeric format
I know of that truncates decimal places (though I'd be happy to be wrong about that)
as I said, just cirious
--
Mike Zdeb
U@Albany School of Public Health
One University Place
Rensselaer, New York 12144-3456
P/518-402-6479 F/630-604-1475