Date: Thu, 15 Jan 1998 11:57:28 -0500
Reply-To: SWILLIAM@ui.urban.org
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Sean Williams <swilliam@UI.URBAN.ORG>
Organization: Urban Institute
Subject: Missprinting of Long Numeric Variables
I have a 20 digit character variable that I've converted to a numeric
variable. However, I'm getting some weird results from proc print,
it seems that proc print is missprinting the numeric variable.
Note the last for digits of LONGNUM vs. LONGCHAR in the output below.
Here is the test program that I ran:
options ls=75;
data g;
longchar= '12345678912345678912';
longnum= 12345678912345678912;
shortnum=longnum-12345678912345670000;
shortch=longchar-12345678912345670000;
proc print;
format longnum 32.;
run;
OUTPUT FROM PROC PRINT....
OBS LONGCHAR LONGNUM SHORTNUM SHORTCH
1 12345678912345678912 12345678912345677824 8192 8192
*******************
Sean Williams
Research Assistant
The Urban Institute
2100 M Street N.W.
Washington, DC 20037
(202) 857-8607
*******************