handling special 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
venni
Participant
Posts: 1
Joined: Thu Jul 17, 2008 3:22 am

handling special characters

Post by venni »

Hi frnds,
I have small query...
I hav sorcu data like this..

a$a%d
b^f*g
g@j&*h

pls can any one tell me how to handle this special char's.
swarnkar
Participant
Posts: 74
Joined: Wed Jan 11, 2006 2:22 am

Re: handling special characters

Post by swarnkar »

venni wrote:Hi frnds,
I have small query...
I hav sorcu data like this..

a$a%d
b^f*g
g@j&*h

pls can any one tell me how to handle this special char's.
You can use Oconv function with "MCA" or "MCP" options to get Alpha-Numeric or Printable characters.
fareeda_b
Participant
Posts: 48
Joined: Sat Feb 23, 2008 4:25 pm

hi

Post by fareeda_b »

Hi ,
As of my knowledge u can use string function 2 remove special characters in Query

Select substr(columnname,2,len(columnname) from tablename;

try this it will help you to remove special characters in query

if u want to remove in DS use convert function

thanks
fareeda
Thanks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Which of the characters is "special"?

Oconv() and Iconv() are not available in parallel jobs. Convert() is.

The way I would go about this is to set up a stage variable which is initialized to contain a list of all the special characters. In an output column derivation I would use something like

Code: Select all

Convert(svSpecialChars, "", InLink.SourceField)
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