home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / bit / listserv / sasl / 4114 < prev    next >
Encoding:
Text File  |  1992-09-09  |  2.0 KB  |  43 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!gatech!paladin.american.edu!auvm!NPRDC.NAVY.MIL!ALDERTON
  3. Message-ID: <9209092041.AA17484@pacific.nprdc.navy.mil>
  4. Newsgroups: bit.listserv.sas-l
  5. Date:         Wed, 9 Sep 1992 16:43:37 -0400
  6. Reply-To:     alderton@nprdc.navy.mil
  7. Sender:       "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  8. From:         David Alderton <alderton@NPRDC.NAVY.MIL>
  9. Subject:      numbers in SAS -- thanks
  10. Comments: To: SAS-L@uga.cc.uga.edu
  11. Lines: 30
  12.  
  13. Earlier I asked how numbers were stored in SAS because I was trying
  14. to save space running SAS 5.18 under CMS.  I was concerned about
  15. losing accuracy by defining numbers with too short a length.
  16.  
  17. This came up because recently I read in a flat file that was about
  18. 34 Mb and created a SAS dataset that was nearly 4 times that large!
  19. The problem was that every variable was a number and was saved
  20. as 8 bytes.  I recreated the dataset saving the numbers with length=2,
  21. since all were INTEGERS between 0 and 99.  This reduced the size of the
  22. SAS dataset to under 10 Mb.
  23.  
  24. Now I'm getting ready to read files that are (collectively) even larger
  25. and I certainly don't have enough space.  My quandry was that many of
  26. the numbers in the new files are reals or integers larger than those
  27. I had dealt with previously and was afraid I would truncate them.
  28.  
  29. Thanks to everyone for their help, especially Melvin Klassen and
  30. Peter Rikard who provided detailed explanations about representing
  31. numbers.  But I have to admit, I'm still a little confused about how
  32. decimal values (like 999.786) are stored.  As things turned out, I used
  33. length=2 for small integers, 3 for larger integers, 4 for proportions
  34. (i.e., proportion correct rounded to 3 decimal places in the source file),
  35. and used the default (8) for reaction times (measured to the millisecond,
  36. e.g., 10.297).
  37.  
  38. I found no numeric differences between files read using length and those
  39. using the default lengths.  I did however manage a 48% space savings.
  40.  
  41. Thanks again,
  42.    David (alderton@nprdc.navy.mil)
  43.