Page 1 of 1
Cleaning a particular pattern/text : DataStage
Posted: Thu Jun 25, 2009 9:25 am
by divstands
Can a particluar string/text be cleared in the transformer in DataStage
For example:
If an input field is "SAN PEDRO 7777777 ARRIBA"
and we want to remove 7777777 and produce the output as
"SAN PEDRO ARRIBA"
Can this be done? If yes, please help with the syntax.
Posted: Thu Jun 25, 2009 10:08 am
by JRodriguez
Oconv(InputCol, "MCA")
Posted: Thu Jun 25, 2009 11:06 am
by divstands
JRodriguez wrote:Oconv(InputCol, "MCA")
I guess OCONV would not help for my requirement. I looked for it. Hope CHANCE function helps
Posted: Thu Jun 25, 2009 12:00 pm
by JRodriguez
Ohh! you are only parallel then this will do the trick
Convert("0123456789",'', InputCol )
Also while standardizing your data you can assign the null class to numeric token....
Posted: Thu Jun 25, 2009 12:49 pm
by divstands
JRodriguez wrote:Ohh! you are only parallel then this will do the trick
Convert("0123456789",'', InputCol )
Also while standardizing your data you can assign the null class to numeric token....
no... i just want to remove 77777777 if it exist in the string
Posted: Thu Jun 25, 2009 12:50 pm
by divstands
JRodriguez wrote:Ohh! you are only parallel then this will do the trick
Convert("0123456789",'', InputCol )
Also while standardizing your data you can assign the null class to numeric token....
no... i just want to remove 77777777 if it exist in the string
Posted: Thu Jun 25, 2009 1:16 pm
by JRodriguez
If is only 77777777 that you want to remove then
Convert("7",'', InputCol )
It will only remove the string if exist ...else your input value will return
Posted: Thu Jun 25, 2009 4:11 pm
by ray.wurlod
Or a simple If..Then..Else expression in a Transformer stage.
Posted: Thu Jun 25, 2009 5:58 pm
by chulett
Don't guess, read the docs! Search the forums for a posted PX version of the Server EReplace function by DSGuru2B, that will do the substitution you need.