home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!paladin.american.edu!auvm!NIHCU.BITNET!HIS
- Message-ID: <SAS-L%92090113255889@UGA.CC.UGA.EDU>
- Newsgroups: bit.listserv.sas-l
- Date: Tue, 1 Sep 1992 07:53:09 EDT
- Reply-To: Howard Schreier <HIS@NIHCU.BITNET>
- Sender: "SAS(r) Discussion" <SAS-L@UGA.BITNET>
- From: Howard Schreier <HIS@NIHCU.BITNET>
- Subject: Re: FLOWOVER problem with comma delimited data
- Comments: cc: oldenkmp@ESPRESSO.BOEING.COM
- Lines: 61
-
- CONTENT: Response
- SUMMARY: Fields cannot straddle records, even with FLOWOVER
-
- > Ok, this has got to be simple but I must be having a bad day and am
- > RTFMing cross eyed.
- >
- > The user has comma delimited data where some of the data may
- > wrap-around to the next line. Here is a simplified example:
- >
- > data test01;
- > length v1-v4 $ 11;
- > infile cards delimiter=',' flowover;
- > input v1 v2 v3 v4 @@ ;
- > cards;
- > one one,two two,three three,four four,
- > one one,two two,three three,four
- > four,one one,two two,three three,four four,
- > one one,two two,three three,four four,
- > ;;
- >
- > This produces the following output:
- >
- > OBS V1 V2 V3 V4
- >
- > 1 one one two two three three four four
- > 2 one one two two three three
- > 3 four four one one two two
- > 4 three three four four one one
- > 5 two two three three four four
- >
- > instead of the desired:
- >
- > OBS V1 V2 V3 V4
- >
- > 1 one one two two three three four four
- > 2 one one two two three three four four
- > 3 one one two two three three four four
- > 4 one one two two three three four four
- >
- > What am I doing wrong? How can I read such a file?
-
- My understanding of INPUT behavior is that the end of a
- record is always a field terminator. So, each trailing
- comma in your cards implies an additional field, between the
- comma and the end of the record, which generates a missing
- value. Another implication is that a field cannot straddle
- two records.
-
- I'm afraid that this data set cannot be built with a simple
- INPUT statement.
-
- By the way, FLOWOVER is the default (alternatives are
- MISSOVER and STOPOVER), so coding it explicitly really
- doesn't change anything.
-
- /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
- \ Howard Schreier, U.S. Dept. of Commerce, Washington /
- / MVS 5.18 & 6.07 \
- \ Voice: (202) 377-4180 BITNET: HIS@NIHCU /
- / Fax: (202) 377-4614 INTERNET: HIS@CU.NIH.GOV \
- \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
-