Date: Wed, 3 Sep 1997 14:38:50 PST
Reply-To: William Viergever <wwvierg@ibm.net>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: William Viergever <wwvierg@IBM.NET>
Subject: Re: truncated lines
Addressed to: Donny Tang <dtang@INTERSEARCHCORP.COM>
SAS-L@UGA.CC.UGA.EDU
** Reply to note from Donny Tang <dtang@INTERSEARCHCORP.COM> Wed, 3 Sep 1997 17:00:37 +0000
>
> I am trying to read a comma delimited file into SAS format.
>
> I already used the command "missover" to read missing observation but
> I kept getting message in my log file saying "one or more lines were
> truncated". And I found out that when it reads till certain
> variables, it stops reading it.
>
> My SAS PROGRAM was:
>
> libname mylib 'c:\sas';
> data mylib.one;
> infile 'c:\sas\original.txt' delimiter=',' missover;
> length variable $ 6 . . . ;
> input variable . . .;
> run;
>
> data mylib.two;
> set mylib.one (firstobs=2); /* skipping reading the first observation
> because it is the field name row*/
> run;
>
> proc print data=mylib.two label;
> label variable=' ' . . ;
> run;
>
>
>
> Please help!
>
Try this e.g.:
input
var1 : $6
var2 : $10
where the informat lengths are correct, *BUT* include the colon option
(forget what it's called) for each var (it allows for data shorter than
expected).
Hope this helps-
==================
W.W. Viergever
Principal
Viergever & Associates
Sacramento, CA
(916) 923-2355
==================
|