Control 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
nielsek
Participant
Posts: 1
Joined: Wed Feb 16, 2005 3:29 pm

Control Characters???

Post 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
Kyle
thumsup9
Charter Member
Charter Member
Posts: 168
Joined: Fri Feb 18, 2005 11:29 am

Post 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.
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Hi,
You can use sed command
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post 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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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 "".
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