Date: Fri, 20 Apr 2007 07:38:37 -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: floating point and scientific notation - please help!
You should format your variables
format var1 var2 var3.... 12.;
Be careful, sometimes you might have decimal values, like 12.34. Depending
on your EXCEL, that might force you to use another format.
E.g. if your decimal delimiter in EXCEL is ',' instead of '.', you should
COMMAX22.3
for that, not simply 22.3
Gerhard
On Fri, 20 Apr 2007 04:07:49 -0700, nicola.dawes5@googlemail.com
<nicola.dawes5@GOOGLEMAIL.COM> wrote:
>I am new to SAS but have been on a fundamentals training course. I'm
>running Proc Freq on my data and it produces some outputs with large
>numbers (upto 8 characters), on the output screen SAS truncates these
>values using scientific notation for instance 34523349 becomes 3.45E7.
>If I copy the output and paste it into excel it only pastes the
>truncated value, which I expected, but if I use the Proc Print To
>statement and print to a CSV file the same problem still occurs. This
>is a major problem for me as the number then becomes 34500000 and I
>will be summing a series of these numbers and using them to generate
>prevalence data so I need more precision.
>
>Does anyone know how to stop SAS from doing this? I have noticed that
>when I generate just 1 column of data it displays the full number, but
>when there are 3 columns it truncates the numbers. I have set the
>linesize to maximum and this seems to make no difference. Is there
>anyway of specifying the width of individual columns in a Proc Freq
>output? Or of forcing SAS to display full numbers?
>
>Any help will be gratefully received
>
>Nic.
|