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
basu.ds
Participant
Posts: 118 Joined: Tue Feb 06, 2007 12:59 am
Location: Bangalore
Post
by basu.ds » Thu Apr 17, 2008 4:21 am
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 » Thu Apr 17, 2008 4:35 am
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 » Thu Apr 17, 2008 4:39 am
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 » Thu Apr 17, 2008 5:37 am
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
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Thu Apr 17, 2008 6:40 am
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 » Fri Apr 18, 2008 12:17 am
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 » Fri Apr 18, 2008 12:25 am
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 » Fri Apr 18, 2008 2:53 am
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