UnwantedCharecters remove which are not identified bykeyboad

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
basu.ds
Participant
Posts: 118
Joined: Tue Feb 06, 2007 12:59 am
Location: Bangalore

UnwantedCharecters remove which are not identified bykeyboad

Post by basu.ds »

Hi all,
Can any one help me on this i want to remove the charecters which are not identified by the keyboard like special symbols any routine needs to write or any fredefined function is there?if i want to convert a string or charecter to ascii value what could be the NLS ?
Thanks in advance
basu
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Oconv(InLink.TheString, "MCP") will convert all non-printable characters to ".".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
basu.ds
Participant
Posts: 118
Joined: Tue Feb 06, 2007 12:59 am
Location: Bangalore

Post by basu.ds »

Thaks a lot ray but i don't want period symbol also
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

Convert(".", "", Oconv(InLink.TheString, "MCP"))
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

As long as you realize that will remove all periods, including ones not generated from the MCP conversion.
-craig

"You can never have too many knives" -- Logan Nine Fingers
basu.ds
Participant
Posts: 118
Joined: Tue Feb 06, 2007 12:59 am
Location: Bangalore

Post by basu.ds »

thanks a lot for responds.all periods will convert so if period is already there in my source data that should be as it is.in this case how can i handle .let me if anything can be done.
thnaks
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Change your "real" dot to something else, such as ~; effect the removal, then convert all tilde characters back to dots.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
basu.ds
Participant
Posts: 118
Joined: Tue Feb 06, 2007 12:59 am
Location: Bangalore

Post by basu.ds »

Thanks a lot ray for you are guidence.i got it but i ask for better than this any have i will fallow this only
Post Reply