Instead of using your usual INPUT statement you could use an empty INPUT
statement, implicitly filling your _INFILE_ variable. You have to analyze
the contents of that variable yourself into the other variables. But with
your 5th variable you could search for the ending double quote, while
reading subsequent records (INPUT;) and append the contents to that 5th one.
Regards - Jim.
Jim Groeneveld, Netherlands
Statistician, SAS consultant
On Wed, 10 May 2006 06:04:09 -0700, Rick <rdbisch@GMAIL.COM> wrote:
>Hello all. I have a slight problem reading a comma seperated file with
>a long text field. Basically the problem record looks like this:
>1,2,3,4,"This is a sample text that illustrates my problem.
>I hit enter a few times here.Blah blah blah", "shorter text", "small",
>The first four variables are stored OK. The fifth variable has the
>value "This is a sample text that illustrates my problem.". The sixth
>has the value "I hit enter a few times here.Blah blah blah", when it
>should have the value "shorter text".
>Is there a way to get SAS to read in that entire text into a single
>variable? Right now my infile statement is:
>"infile sample.txt dsd lrecl=8192"