Newsgroups: bit.listserv.sas-l
Date:         Tue, 1 Sep 1992 10:16:35 LCL
Reply-To:     RIKARD@VCUMVS.BITNET
From:         RIKARD@VCUMVS.BITNET
Subject:      delimited data and flowover

Content: Response
Summary: Flowover and delimited data
Release and platform: 6.07/mvs (at least)
Name:    Pete Rikard
Mail addresses:BITNET Rikard@vcumvs Internet rikard@vcuucc.ucc.vcu.edu
Real Addresses:Virginia Commonwealth University, Computer Center
               110 S. 7th Street, 4th Floor, Richmond, VA 23219
               Phone (804) 786-4828    FAX: (804) 371-8464
******************************************************************
--------- original note   ----------------------------------------------
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,
;;
run;

proc print;
run;

This produces the following output:

                                 The SAS System    13:18 Monday, August 31, 1992
                                                                               7

        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:
                                 The SAS System    13:18 Monday, August 31, 1992
                                                                               8

             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

______________________________________________________________________

It would appear that SAS treats the end of line as a delimiter, even
with the DLM= option being used. I moved the data to it's own
file and added the RECFM=U option to the infile statement and
I get the FLOWOVER to work.

Note: RECFM= doesn't work with INFILE CARDS

RECFM=U  has SAS read "continuously" instead of treating logical
records as physical records (no I don't want to discuss logical
vs physical records here). When you get to a block boundary you
still get a delimiter added by SAS. So for all but small datasets
even this fix won't work.

The data will NOT appear as you would like unless we really have
variable length records and the break between "four" on one line and
"four" on the next is one character. On fixed length records (typical
of SAS input streams) you will need to change the length of the
variables to see the results.

Finally, with the @@ and RECFM=U you will get a "lost card"
generated. Not a terrible problem but it will be there.
Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU