ok, in that case u was too short:
infile "c:\daten\test.dat" dlm="," truncover dsd firstobs=2;
site : 8.
id : 8.
pid : 8.
it : $5.
dd : ANYDTDTM20.
itd : 8.
rtd : 8.
linkid : 8.
sp : 8.
fc : 8.
dtc : ANYDTDTM20.
dtm : ANYDTDTM20.
u : $15.
u = compress(u,'""');
it = compress(it,'""');
format dtm dtc dd datetime20.;
On Wed, 5 Nov 2008 10:20:47 -0800, olivesecret@GMAIL.COM wrote:
>Here is my code:
> data data;
> infile 'data.txt' delimiter=',' dsd firstobs=2;
> input site id pid it $ dd itd rtd linkid sp fc dtc dtm u $5. ;
>Here is one more obs:
>Other obs are similar.
>Thank you very much!
>On Nov 5, 12:24 pm, Nord...@DSHS.WA.GOV ("Nordlund, Dan (DSHS/RDA)")
>> > -----Original Message-----
>> > From: SAS(r) Discussion [mailto:SA...@LISTSERV.UGA.EDU] On
>> > Behalf Of olivesec...@GMAIL.COM
>> > Sent: Wednesday, November 05, 2008 8:50 AM
>> > To: SA...@LISTSERV.UGA.EDU
>> > Subject: Re: help with reading ASCII data into SAS
>> > Yes, I did it with delimiter=',' dsd firstobs=2, but was told invalid
>> > data for each variable.
>> > Any more suggestions? Thanks a lot!
>> You will need to show us the actual code you are using to read the file
if you want more than just a guess as to what went wrong. Seeing the log
file with actual error message would be helpful as well.
>> Daniel J. Nordlund
>> Washington State Department of Social and Health Services
>> Planning, Performance, and Accountability
>> Research and Data Analysis Division
>> Olympia, WA 98504-5204