Getting rid of new line while inserting in .txt file

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
times29
Premium Member
Premium Member
Posts: 202
Joined: Mon Sep 22, 2008 3:47 pm

Getting rid of new line while inserting in .txt file

Post by times29 »

Hi,
i have new lines for text field like below:

"My name is John

Sign-up here: - john.com

This is test message"

should be converted to

"My name is John Sign-up here: - john.com This is test message"

Is there a way way we can do while inserting to .txt and .ds file

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

Post by ray.wurlod »

How do you know when "end of group" has occurred? For example, are there always three input lines that have to become one, or might there be two or four or some other number?

With that information more cogent advice may be possible.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I think this is one string field in a single record that has 'new lines' in it. If that's the case then you could use Convert() to either remove them or convert them to a space. Use CHAR(10) to represent the new line / line feed, for example.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply