LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Tue, 21 May 2002 10:11:15 -0400
Reply-To:   diskin.dennis@KENDLE.COM
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   diskin.dennis@KENDLE.COM
Subject:   Re: Importing large integers into SAS
Comments:   To: VINCENT DUFORT <NHPRO.VDUFORT@SDPS.ORG>
Content-type:   text/plain; charset=us-ascii

Vincent,

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.

HTH, Dennis Diskin

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>

To: SAS-L@LISTSERV.UGA.EDU cc:

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 apparent rounding. 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. Any insights? Thank you, Vince

Vincent Dufort, PhD, Epidemiologist Northeast Health Care Quality Foundation 15 Old Rollinsford Road, Suite 302 Dover, NH 03820-2830

e-mail: nhpro.vdufort@sdps.org (603) 749-1641 ext 155 fax: (603) 749-1195 www.medicarequality.org

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.


Back to: Top of message | Previous page | Main SAS-L page