home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / bit / listserv / sasl / 4975 < prev    next >
Encoding:
Internet Message Format  |  1992-11-09  |  2.1 KB

  1. Path: sparky!uunet!noc.near.net!hri.com!spool.mu.edu!darwin.sura.net!paladin.american.edu!auvm!CLEMSON.BITNET!SUMA
  2. From: SUMA@CLEMSON.BITNET
  3. Newsgroups: bit.listserv.sas-l
  4. Subject: follow up question
  5. Message-ID: <SAS-L%92110916232306@AWIIMC12.IMC.UNIVIE.AC.AT>
  6. Date: 9 Nov 92 15:21:00 GMT
  7. Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  8. Reply-To: SUMA@CLEMSON.BITNET
  9. Lines: 59
  10. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  11.  
  12. To try and answer my own question I ran the following short program
  13. //CHECK JOB TIME=(,16)
  14. /*JOBPARM Q=H
  15. //*
  16. //*
  17. // EXEC SAS518
  18. data check; input b c d;
  19. cards;
  20. 10 5 2
  21. 12 4 3
  22. 12 0 6
  23. 12 . 2
  24. 12 3 5
  25. 10 2 5
  26. 10   2
  27. 12 2 1
  28. 8  2 4;
  29. proc print; var b c d;
  30. data new; set check;
  31. a=b/c ;
  32. x=c/d ;
  33. proc print; var a x;
  34. The program ran with error message and gave the foll output.
  35. Values for b c and d were not printed.
  36. Following values were printed for a and x
  37. 1. 2  2.5
  38. 2. 3 1.33
  39. 3. . 0
  40. 4. .  .
  41. 5. 4  0.6
  42. 6. 5  0.4
  43. 7. 5  0.17
  44.  
  45. I observed that sas treats any 0 or missing value for c represented
  46. as . as a missing value and prints the corresp value of a as .
  47. That is just great! the problem only occurs when a missing value in
  48. a dataset is represented as a blank space.
  49. Now I have a follow up question.
  50. When you use SAS to read a data set and write out data in a real
  51. binary format (rb.) how does SAS store the missing values?
  52. Are the missing values stored as . or as a blank space?
  53. I used SAS to read some data and stored the data in real binary format.
  54. I then read the same data in another program using SAS  like this
  55. DATA CDAT; INFILE CDAT ;
  56.   INPUT @1 CUSIP $ SIC ZLIST FILE FYR YEAR SMBL $ adate
  57.      TYPE $  OUTCOME $ BIDDER BIDNUM tapeyr
  58. (X1 X2 X4 X5 X6 X9 X10 X11 X12 X13 X14 X15 X16 X18 X21 X24 X25 X26
  59. X30 X34 X41 X44 X52 X58 X60 X108 X111 X114 X115 x181) (RB.);
  60. I now have following statemnts such as A = X9/X6;
  61. IF    I omitted to include a statement such as
  62. if x6 = 0 or x6=. then a=.;
  63. else a= x9/x6;
  64. would SAS automatically take care of the missing and zero values by
  65. default given that
  66. CDAT was created using a put statement identical to
  67. the input statement mentioned above?
  68. Any replies would be greatly appreciated.
  69. Uma
  70. SUMA@CLEMSON
  71.