Handling Junk 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
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

One approach is to use a string function first to strip all white space then use another string function like AlNum() to checks whether the given string contains only alphanumeric characters or not.
Choose a job you love, and you will never have to work a day in your life. - Confucius
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Step 1: sort out your data provider(s).

Step 2: use the "double Convert()" technique to preserve only wanted characters.

Code: Select all

Convert(inLink.TheString, Convert(inLink.theString, wantedchars, ""), "")
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
UCDI
Premium Member
Premium Member
Posts: 383
Joined: Mon Mar 21, 2016 2:00 pm

Post by UCDI »

to just remove the records entirely you can do it with a single convert, or possibly even more efficiently with 'alpha' if that fits the data need? A single convert, you convert all the valid chars to nothing and then check the length of the remainder.

double convert fixes the data, which is a different thing from "remove these records from further processing"
Post Reply