home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / bit / listserv / sasl / 3973 < prev    next >
Encoding:
Text File  |  1992-09-01  |  2.8 KB  |  74 lines

  1. Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
  2. Path: sparky!uunet!paladin.american.edu!auvm!NIHCU.BITNET!HIS
  3. Message-ID: <SAS-L%92090113255889@UGA.CC.UGA.EDU>
  4. Newsgroups: bit.listserv.sas-l
  5. Date:         Tue, 1 Sep 1992 07:53:09 EDT
  6. Reply-To:     Howard Schreier <HIS@NIHCU.BITNET>
  7. Sender:       "SAS(r) Discussion" <SAS-L@UGA.BITNET>
  8. From:         Howard Schreier <HIS@NIHCU.BITNET>
  9. Subject: Re: FLOWOVER problem with comma delimited data
  10. Comments: cc: oldenkmp@ESPRESSO.BOEING.COM
  11. Lines: 61
  12.  
  13. CONTENT:  Response
  14. SUMMARY:  Fields cannot straddle records, even with FLOWOVER
  15.  
  16. > Ok, this has got to be simple but I must be having a bad day and am
  17. > RTFMing cross eyed.
  18. >
  19. > The user has comma delimited data where some of the data may
  20. > wrap-around to the next line.  Here is a simplified example:
  21. >
  22. > data test01;
  23. >  length v1-v4 $ 11;
  24. >  infile cards delimiter=',' flowover;
  25. >  input v1 v2 v3  v4 @@ ;
  26. >  cards;
  27. > one one,two two,three three,four four,
  28. > one one,two two,three three,four
  29. >  four,one one,two two,three three,four four,
  30. > one one,two two,three three,four four,
  31. > ;;
  32. >
  33. > This produces the following output:
  34. >
  35. >         OBS    V1             V2             V3             V4
  36. >
  37. >          1     one one        two two        three three    four four
  38. >          2                    one one        two two        three three
  39. >          3     four           four           one one        two two
  40. >          4     three three    four four                     one one
  41. >          5     two two        three three    four four
  42. >
  43. > instead of the desired:
  44. >
  45. >              OBS      V1         V2           V3            V4
  46. >
  47. >               1     one one    two two    three three    four four
  48. >               2     one one    two two    three three    four four
  49. >               3     one one    two two    three three    four four
  50. >               4     one one    two two    three three    four four
  51. >
  52. > What am I doing wrong?  How can I read such a file?
  53.  
  54. My understanding of INPUT behavior is  that  the  end  of  a
  55. record  is  always  a  field  terminator.  So, each trailing
  56. comma in your cards implies an additional field, between the
  57. comma  and  the end of the record, which generates a missing
  58. value.  Another implication is that a field cannot  straddle
  59. two records.
  60.  
  61. I'm afraid that this data set cannot be built with a  simple
  62. INPUT statement.
  63.  
  64. By the  way,  FLOWOVER  is  the  default  (alternatives  are
  65. MISSOVER  and  STOPOVER),  so  coding  it  explicitly really
  66. doesn't change anything.
  67.  
  68. /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
  69. \   Howard Schreier, U.S. Dept. of Commerce, Washington    /
  70. /                     MVS 5.18 & 6.07                      \
  71. \   Voice: (202) 377-4180        BITNET: HIS@NIHCU         /
  72. /   Fax:   (202) 377-4614      INTERNET: HIS@CU.NIH.GOV    \
  73. \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
  74.