From: Praveen Sawh on
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?
From: Praveen Sawh on
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...(a)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?

From: Praveen Sawh on
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...(a)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?