|
Dave,
Since your raw text file has varying length fields, you may use LENGTH(or
ATTRIB) statement specifying fields first, then you could DSD option in INFILE
statement. The DSD option is specially for comma delimiter file(see below).
Hope this helps.
Data Junk;
length num1 num2 8 name comment $20 num3 8;
infile raw dsd pad;
input num1 num2 name comment num3;
run;
Boylan, Dave wrote:
> I'm having trouble reading a delimited text file with varying length fields
> longer than 8 characters. It seems that SAS truncates the character field
> after the 8th character. For example, a text file record like:
>
> 100,9999,bill,hello world,755
>
> read with the following SAS program:
>
> Data Junk;
> infile raw dlm=',';
> input num1 num2 name $ comment $ num3;
> run;
>
> Gives the following results:
>
> num1 num2 name comment num3;
> 100 9999 bill hello w orld755
>
> I'm sure that I am missing something simple here.
>
> Thanks
> --------------------------------------
> David Boylan
> Corporate Forecasting
> UtiliCorp United, Inc.
> 816.467.3062
> --------------------------------------
|