Page 1 of 1

Reading Valid records from sequential file

Posted: Fri Mar 20, 2009 12:21 am
by sjordery
Hi All,

I am just trying to read a sequential file having 1 column.
When I count the no of lines in the file it shows 100 lines but 20 records having proper values rest are only blank lines i.e 80 times enter key has been pressed while writing.
To avoid those records i specfiled the column as not null but still i am not able to avoid those unwanted 80 records.I also tried by specifying final delimeter string as '\n' but no luck.

Could any one suggest how to do this?

Posted: Fri Mar 20, 2009 1:57 pm
by DSguru2B
Constraint it in the transformer stage by specifying LEN(In.Col) > 0 or something.

Posted: Mon Mar 23, 2009 6:11 am
by throbinson
How about nipping it in the bud by filtering out the unwanted rows in the Sequential stage?

Code: Select all

grep -v ^$
should filter out empty lines