advice on best methods to remove CR/LF's

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
marc_brown98
Premium Member
Premium Member
Posts: 67
Joined: Wed Apr 14, 2004 11:33 am

advice on best methods to remove CR/LF's

Post by marc_brown98 »

One of my source systems it appears has decided to put your random CF/LF's into a couple fields. What are some methods you employ to inspect and remove them where they don't belong?

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

Post by ray.wurlod »

Unless you have permission to remove them, you should not. These are part of the source data.

Assuming, then, that you do have permission to remove them, my preference in a server job is to create a stage variable (called svCRLF for example) initialized to Char(13):Char(10) and to use a Convert() function such as

Code: Select all

Convert(svCRLF,"",InLink.TheFieldName)
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