Non-Alpha numeric characters

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
reachmexyz
Premium Member
Premium Member
Posts: 296
Joined: Sun Nov 16, 2008 7:41 pm

Non-Alpha numeric characters

Post by reachmexyz »

hello all

In my feed, i get Non-alpha Numeric characters like ?,<> and also Html encode characters like $#284, $#123, \x67 and so on. Now i need to replace some of the characters will null and some with hyphes. using PXReplace i can only replace one string But in this case i need to replace multiple strings. how can i do it. Please reply
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

If you want to do character by character replacement then use Convert()
You are the creator of your destiny - Swami Vivekananda
reachmexyz
Premium Member
Premium Member
Posts: 296
Joined: Sun Nov 16, 2008 7:41 pm

Post by reachmexyz »

anbu wrote:If you want to do character by character replacement then use Convert()
i want to do string by string. Cant i do this in Datastage.
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

You have to call PXReplace() multiple times
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 »

Yes, I was even searching for it and found that there is no equivalent function in PX for server 'ereplace' :(

But I believe ereplace will work in BASIC_Transformer.
Arun
anbu
Premium Member
Premium Member
Posts: 596
Joined: Sat Feb 18, 2006 2:25 am
Location: india

Post by anbu »

Search the forum for C++ EReplace() function. This can be used in PX.
You are the creator of your destiny - Swami Vivekananda
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Adapt the parallel Ereplace() function to handle multiple strings. Or create a "wrapper" routine to feed one string at a time to that Ereplace() function.
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