|Date: ||Tue, 21 May 2002 10:11:15 -0400|
|Sender: ||"SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>|
|Subject: ||Re: Importing large integers into SAS|
|Content-type: ||text/plain; charset=us-ascii|
Congratulations, you have rediscovered the precision limitation of floating
point numbers. Basically, integers can only be exactly represented up to
about 10**16. Beyond that, the lower order digits drop off. Your solution
of using a character variable is the most practical. Try reviewing the
archives or the manual regarding floating point number representation.
From: VINCENT DUFORT <NHPRO.VDUFORT@SDPS.ORG>@LISTSERV.UGA.EDU> on
05/21/2002 09:34 AM
Please respond to VINCENT DUFORT <NHPRO.VDUFORT@SDPS.ORG>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Subject: Importing large integers into SAS
I am attempting to import a flat file that has an 18 digit integer format
variable in one field. When I do this using:
import @1 link_nbr 18.;
The imported variable, supposed to be sequential and increasing by 1 for
each record, is converted to the following pattern.
xxxxxxxxxxxxxxxx00, xxxxxxxxxxxxxxxx32, xxxxxxxxxxxxxxxx64 with multiples
of each result. I don't understand how that is happening.
I resolved the problem by specifying $18. character format but wonder if
there is a way to get it to import the long numeric correctly without the
I also found in the initial import trial that I had to use a format
statement so the variable did not appear in scientific notation.
Vincent Dufort, PhD, Epidemiologist
Northeast Health Care Quality Foundation
15 Old Rollinsford Road, Suite 302
Dover, NH 03820-2830
(603) 749-1641 ext 155
fax: (603) 749-1195
As an adolescent I aspired to lasting fame, I craved factual
certainty, and I thirsted for a meaningful vision of human
life -- so I became a scientist. This is like becoming an
archbishop so you can meet girls. --Matt Cartmill, Scientist
You can not make a pig grow by weighing him - Irish proverb.