Issue in removing new line character

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rajendharreddy
Participant
Posts: 46
Joined: Tue Aug 21, 2007 5:39 am
Location: Bangalore, India

Issue in removing new line character

Post by rajendharreddy »

Hi,

In one of my source file we are getting new line character at the end of each row. I have to take care this in Data Stage.

I have used following fuction in derivation column, but new line character is not getting removed.

Ereplace(DSLink3.Desc,CHAR(8),'',-1,1)

I am trying to replace last digit in the record.

Can any help me on this?

Thanks.
rajendharreddy
Participant
Posts: 46
Joined: Tue Aug 21, 2007 5:39 am
Location: Bangalore, India

Post by rajendharreddy »

The above function is Ereplace(DSLink3.TimeSubGrp,CHAR(8),'',-1,1)
rajendharreddy
Participant
Posts: 46
Joined: Tue Aug 21, 2007 5:39 am
Location: Bangalore, India

Post by rajendharreddy »

sorry, When I submit CHAR 8 is getting replaced
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Can you not edit the sequential file stage and add the newline to Format -> Record Level -> Record Delimiter?
naveen19
Participant
Posts: 52
Joined: Tue Mar 06, 2007 9:08 am
Location: India
Contact:

Post by naveen19 »

rajendharreddy wrote:sorry, When I submit CHAR 8 is getting replaced

Hi,

U can use the convert in the transformer to remove the unwanted line

Convert('-','', inputcolumn)

i have replaced the '-' by null space ('')

Regards
Naveen.K
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Change your line terminator to DOS-style in the stage properties of the Sequential File stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply