Unable to remove dos new line characters using convert

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
RK72
Participant
Posts: 154
Joined: Wed Sep 29, 2010 4:10 pm

Unable to remove dos new line characters using convert

Post by RK72 »

As suggested by most of the people in the forum I used convert(char(13),' ',ipcol) to remove new line characters in a field while writing to a output sequential file.I was able to remove some of them but still there are few records where the field value is breaking the record line into two or three lines.I tried column terminators to yes,tr command and convert function but nothing is helping.Could anyone please suggest me on it as I am not sure if there are any other characters in the column value which is causing it to break.The source is lotus notes database table extracted from ODBC stage.I also used the combination of convert and column terminator.
nani0907
Participant
Posts: 155
Joined: Wed Apr 18, 2007 10:30 am

Post by nani0907 »

1)check weather the column metdata is correct in the seqfle

2) give dos format for "record delimiter string" inseq file options

try this once
thanks n regards
nani
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Could you be getting DOS format of <CR><LF>? This would require a convert command of "CONVERT(Char(10):Char(13),'',ipcol)" for you.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Ereplace() would be the more appropriate function, since Convert() only performs a character-by-character conversion. The Convert() solution would also eliminate isolated LF and CR characters, possible incorrectly.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
RK72
Participant
Posts: 154
Joined: Wed Sep 29, 2010 4:10 pm

Post by RK72 »

It was the char(10) problem.I resolved it.Thanks for all the help.
Post Reply