Replace Linefeed Characters coming from the source with null

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
prasad_chennai
Participant
Posts: 38
Joined: Wed Jul 18, 2007 12:23 am
Location: Chennai

Replace Linefeed Characters coming from the source with null

Post by prasad_chennai »

Hi All,

I have a simple datastage job where I am extracting the data from a table and I am creating a flat file(text file). These flat files are used to generate reports. But I am getting linefeeds embedded with some of the values coming from certain columns. How can I replace these linefeeds with a null value.

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

Post by ray.wurlod »

Code: Select all

Convert(svLF, "", InLink.TheString)
You do not want to convert to NULL, you want to convert to zero-length string.
Initialize stage variable svLF to Char(10) and do not supply a per-row derivation expression.
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