Page 1 of 1

Control Characters???

Posted: Thu Sep 21, 2006 10:46 am
by nielsek
How do I scrub control characters from data using DataStage. I've tried using the convert function in a transformer with no luck.

Data looks something like this: ^Hgooddata^C^H

Posted: Thu Sep 21, 2006 11:45 am
by thumsup9
Nielsek,

I will probably do using some unix commands like "tr - d" or :%s/.^H//g if the source file is a sequential file. Search for Control Characters and you will find some interesting threads in this forum.

Posted: Thu Sep 21, 2006 11:58 am
by meena
Hi,
You can use sed command

Posted: Thu Sep 21, 2006 12:02 pm
by meena
Hi,
You can use "sed" command OR you can use "Oconv" function in the basic transformer.To know more do a search.
How do I scrub control characters from data using DataStage. I've tried using the convert function in a transformer with no luck.

Data looks something like this: ^Hgooddata^C^H

Posted: Thu Sep 21, 2006 3:10 pm
by ray.wurlod
You should be able to use the Convert() function. ^C is Char(3), ^H is Ctrl(8). Construct a list of control characters in a stage variable, and use Convert() to replace that with "".