Removing Special 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
sachinshankrath
Participant
Posts: 7
Joined: Mon Mar 29, 2010 1:36 pm
Location: WASHINGTON, DC

Removing Special Characters

Post by sachinshankrath »

Hello - Anyone worked on removing special characters coming from DB2 and Ms Sql Server databases? Basically the special character can be anything thats not an alphabet/number or anything thats not on the keyboard. How would I go about writing something in Datastage v8.7 Parallel that would parse an input string, accept only letters/numbers/any character found on the keyboard but convert everything else to spaces? Anything found on the keyboard such as !@#$%^....is acceptable because that can be easily removed later.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Do an exact search here for "double convert" where you provide a list of the characters you want to keep and everything else is removed from the string. One such example is here.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sachinshankrath
Participant
Posts: 7
Joined: Mon Mar 29, 2010 1:36 pm
Location: WASHINGTON, DC

Removing Special Characters

Post by sachinshankrath »

THANK YOU! It seems to work and I hope it captures all special characters. Only time will tell....I will come back here if I face further problems.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Is this what your customer wants? Are (some of) these special characters meaningful to them, for example accented alphabetic characters?
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