Convert asci characters in string to blank

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
koojo
Premium Member
Premium Member
Posts: 43
Joined: Sun Jul 11, 2004 1:30 pm
Location: USA

Convert asci characters in string to blank

Post by koojo »

I need to convert a character string with any special characters in them.

Something like the convert function but want to use a ascii range to schan the characters and remove them.

I need to scan all special characters (Hex code - 0 to 1F) and remove them. Can I do this with a single function.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

An embedded convert() within a convert() will do this...several examples of doing just what you have asked for are in the forum for the searching...

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Don't refer to these characters as "special" - they're not. If you must, refer to them as Control Set 0. Initialize a stage variable to contain a concatenated string of all 32 (specified using the Char() function) and use Convert() in the derivation expressions to convert this string of characters to "" or " ", depending on what you mean by "blank".
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