Convert special character to text

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
UCDI
Premium Member
Premium Member
Posts: 383
Joined: Mon Mar 21, 2016 2:00 pm

Post by UCDI »

This is pretty nice, for a very specific situation.

I found convert to be insanely slow for what it is doing. If you are processing large data, I would do it in C or something... an easy way is to make your own ascii table 0-255 that remaps the offending characters to the desired result. Leave the normal letters and the rest of the table as it is. Then you just replace everything, need it or not..

super fast... all your C function does is..

for (x = 0; x < length; x++)
in[x] = table[x];
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The rest of the world tends to use Unicode rather than ASCII. I don't think that C routine would work properly for multi-byte characters in input.
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