Hello,
I am processing an employee file and the Name Column has some hidden characters some of them like
Horizontal Tabs (009)
Carriage return (002)
One way to check is to Use the SEQ() function on each of the caharacters on the Name Column, check the Value and replace them with something else...example for Horizontal tabs and carriage Return I can replace them with space....but that will require reading each and every character 1 by 1 in Name Column....
Question
Is there a way to use some Replace Function in parallel job that would replace any such characters in one command and I don't have to do the conversion manually?
Finding and Replacing all Non Printable Characeters
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 71
- Joined: Mon Jul 09, 2007 1:12 pm
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Convert() function.
This solution is sub-optimal, because it re-evaluates the Char() function twice for every row processed. Better would be to initialize a stage variable to Char(9):Char(12) and use that in the derivation expression.
Code: Select all
Convert(Char(9):Char(12), "", InLink.TheString)
Code: Select all
Convert(svNonPrintingCharacters, "", InLink.TheString)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.