Page 1 of 1

Striping Line Feed Character

Posted: Wed Dec 23, 2009 5:29 am
by Puli
Hi

We have Datastage server Edition in Windows PF and DB2 as Source system. In my data I have a junk field or (LineFeed character) along with data. i have tried with Trim and Ereplace functions but its not identifying the junk field in the data.
The data looks like.............
Lack of Experience Domain/Technology/Product
How do i trim that unwanted field " " from my data....

Thanks in advance for ur valuable comments

Posted: Wed Dec 23, 2009 5:56 am
by Sainath.Srinivasan
EReplace must have worked in this case.

What did you try ?

Try using Convert().

Posted: Wed Dec 23, 2009 6:46 am
by mk_ds09
If data is like the example you have given..means if the junk character is in between, trim wont work in that case.

If you can view your inputs in unix, you can replace those junk characters..

Hope this helps !

Posted: Wed Dec 23, 2009 7:21 am
by priyadarshikunal
what about trim with 'A' option.

are you sure its a line feed character?
try to put the data in any hex editor to identify the character.

Posted: Wed Dec 23, 2009 7:49 am
by chulett
First you must identify the character, then you can strip it easily. A hex editor is the easiest way to do that and there are a ton of free ones out there.

Posted: Tue Dec 29, 2009 10:27 pm
by sandeepsreedhar
How to handle if we are not sure about the incoming junk character?

Posted: Tue Dec 29, 2009 10:46 pm
by ray.wurlod
Become sure! Your initial post told us it was Line Feed.

(This may well be valid data. You can not unilaterally change the data. You may need to handle these charaters rather than simply eliminating them.)

Posted: Mon Jan 04, 2010 2:38 pm
by Abhijeet1980
Puli,

You never explained the reason for removing the so-called junk character. Reason for having it, either.

Theres no need to remove any such characters unless it is displayed somewhere in reports. I believe, this is some kinda descriptive field.

If the above is true, purpose of ETL tool is "Data mover".

If the above is false, get in touch with DB2 DBA on why control characters are included within a field.


Coming to your problem, line feed (Newline or end-of-line aka EOL) and carriage return (CR), try to get the exact character you need to remove for that you feel junk.

Many regards,
Abhijit