Date: Fri, 18 Dec 2009 13:02:04 -0600
Reply-To: Kevin Myers <KevinMyers@AUSTIN.RR.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Kevin Myers <KevinMyers@AUSTIN.RR.COM>
Subject: Re: Import delimited (.txt) file -- URGENT PLEASE
Content-Type: text/plain; format=flowed; charset="iso-8859-1";
reply-type=response
P.S. - More than likely, setting LRECL is all you need.
----- Original Message -----
From: "Kevin Myers" <KevinMyers@austin.rr.com>
To: <tw2@MAIL.COM>; <SAS-L@LISTSERV.UGA.EDU>
Sent: Friday, December 18, 2009 13:00
Subject: Re: Import delimited (.txt) file -- URGENT PLEASE
> Two possibilities:
>
> 1. Some records don't have data for all variables. Try adding the
> MISSOVER, TRUNCOVER, or FLOWOVER options to your infile statement, as
> appropriate.
> 2. Some records are longer than the default record length for your system.
> Try adding the LRECL and/or LINESIZE options to your infile statement, and
> set to a very large value.
>
> HTH,
> s/KAM
>
>
> ----- Original Message -----
> From: "Tom White" <tw2@MAIL.COM>
> To: <SAS-L@LISTSERV.UGA.EDU>
> Sent: Friday, December 18, 2009 12:50
> Subject: Import delimited (.txt) file -- URGENT PLEASE
>
>
> Hello SAS-L,
>
> I have a delimited (|) .txt file with about 300K obs.
>
> I am trying to import it into SAS withy partial success.
>
> I can read in the file fine, bit it is dropping many thousands of records
> (Lost Card).
> Of the 300K obs it brings in only about 40K.
>
> When I bring in only NAME it reads all 300K obs.
> When I bring in both NAME and LAST t brings in all 300K obs.
> When I bring in CITY it drops one obs.
> When I progressively bring in more ad more fields, i.e. read in the file
> in its entirety,
> I have lost most of the obs.
> The file has about 300 character fields.
> I only show 3 below in the code I am using.
> Please HELP.
> Thank you.
>
> data foo;
> length
> NAME
> LAST
> CITY
> .
> .
> .
>
> ;
> infile "/.../MYFILE.txt" DLM='|' DSD;
> input
> NAME
> LAST
> CITY
> .
> .
> .
> '
> run;
>
|