Date: Mon, 8 Feb 2010 15:24:18 -0800
Reply-To: Praveen Sawh <praveensawh@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Praveen Sawh <praveensawh@GMAIL.COM>
Organization: http://groups.google.com
Subject: Re: SUB character and blank rows on CSV import
Content-Type: text/plain; charset=ISO-8859-1
Ok, I used:
if strip(_infile_)='' then delete;
in the data infile step and it seems to work! It ignores the last
blank line in the CSVs. :D
On Feb 8, 5:20 pm, Praveen Sawh <praveens...@gmail.com> wrote:
> I am importing CSVs with SUB (Unix EOF) characters at the end of each
> file (in its own row). I clean it before importing by doing something
> like:
>
> if c = '1a'x then c = '';
> put c;
>
> in a null data step.
>
> The problem is that the row that the SUB character was on, still
> exists. So when I import into SAS, it shows a blank row at the bottom
> of each file.
>
> How can I get SAS to either ignore blank rows, or delete them in the
> previous cleaning step?
|