Page 1 of 1

blank rows in the file

Posted: Tue May 24, 2005 6:54 am
by madhukar
hi all
hw to identify and remove blank rows from the source file

Posted: Tue May 24, 2005 7:13 am
by ArndW
Hello madhukar,

with Px you can either use the filter command to run it through the shell script or command of your choice, or you can read the empty row and then remove it from the output stream with a filter stage, or a transform stage, or a modify stage.

Posted: Tue May 24, 2005 8:05 am
by Sainath.Srinivasan
Does a blank row imply row with spaces to the record length or not even the spaces?

Posted: Tue May 24, 2005 8:20 am
by elavenil
Filter command can be executed in the Server edition as well.

Regards
Saravanan

Posted: Wed May 25, 2005 6:07 am
by dsxdev
Hi madhur,
Can you be clear whether your balnk line means something like this

XXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXAAA

or
XXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXAAA

In first case no need to wory as these records will be rejected by the sequential file stage if you want these records to be trapped then
use a reject link from sequntial files.

seq---------->Trns---------->.......
|
|
|
V
seq (reject)

Reject file contains all teh blank records.

Posted: Mon Nov 20, 2006 2:14 pm
by sonia jacob
I was searching for a solution on a similar problem and found this post. In my experiance the job still throws warnings even when there is a reject link! Would that be right or am i doing something wrong.

dsxdev wrote:Hi madhur,
Can you be clear whether your balnk line means something like this

XXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXAAA

or
XXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXAAA

In first case no need to wory as these records will be rejected by the sequential file stage if you want these records to be trapped then
use a reject link from sequntial files.

seq---------->Trns---------->.......
|
|
|
V
seq (reject)

Reject file contains all teh blank records.

Posted: Tue Nov 21, 2006 8:47 am
by DSguru2B
Use the filter command and use the sed operation to find and delete empty lines.
Put this in the filter command box

Code: Select all

sed -e '/^$/d'