Ereplace doubt

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
chrisjones
Participant
Posts: 194
Joined: Thu May 11, 2006 9:42 am

Ereplace doubt

Post by chrisjones »

Hi ,

I want to replace multiple words with space like Dr or MD or Mrs or Ms in the string with space ..I think using ereplace we can replace one at a time but I want to replace multiple words with space..please suggest.
Thanks,
Chris Jones
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

You have to use ereplace multiple times.
chrisjones
Participant
Posts: 194
Joined: Thu May 11, 2006 9:42 am

Ereplace doubt

Post by chrisjones »

Thanks for your reply.

you mean to say I need to use that many stage varaible like below or is there any other tehchique

sv1=ereplace(sv, "Dr", "")
sv2=ereplace(sv, "Md", "")
sv3=erepace(sv,"Ms","")

And also ereplace is not working in 8.0 parallel stage i used the below syntax.

ereplace(sv, "Dr", "")
Thanks,
Chris Jones
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

ereplace function is not avialable in Parallel jobs. Search for ereplace c++ function in the forum
You are the creator of your destiny - Swami Vivekananda
arunkumarmm
Participant
Posts: 246
Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:

Post by arunkumarmm »

Or you can use a basic tranformer to use ereplace.
Arun
vinothkumar
Participant
Posts: 342
Joined: Tue Nov 04, 2008 10:38 am
Location: Chennai, India

Post by vinothkumar »

It should be coming like this.

sv1=ereplace(sv, "Dr", "")
sv2=ereplace(sv1, "Md", "")
sv3=erepace(sv2,"Ms","")

As anbu said, you can find the equivalent of ereplace function for parallel edition, in one of the posts given by DSGuru.
Post Reply