HI All,
Is there any function in datastage that can be used to search a strange character that is ( ) in a string and then replace it with a space.
thanks
shivan
Function to search a space character in the string
Moderators: chulett, rschirm, roy
Shivan, the OCONV(YourString,'MCP') function replaces all unprintable characters with a '.' (period). You can then convert all periods in that string to spaces using CONVERT() and you would be finished. There is an active thread from today describing how to do this.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
ArndW wrote:...You can then convert all periods in that string to spaces using CONVERT()...
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Shivan,
please, please, please RTFM! I have no problem pointing you in the correct direction but if you are not willing to look up the syntax yourself in the handbook or even do a search on this forum to see how it has been used then there is not a chance that I will do so for you.
(a) Convert() has 3 parameters according to the handbook and the online help.
(b) The function is 'oconv', not 'onconv'
please, please, please RTFM! I have no problem pointing you in the correct direction but if you are not willing to look up the syntax yourself in the handbook or even do a search on this forum to see how it has been used then there is not a chance that I will do so for you.
(a) Convert() has 3 parameters according to the handbook and the online help.
(b) The function is 'oconv', not 'onconv'
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
i saw the thread which was started today. The error still exists. The way the convert function was used in the thread doesnt solve the problem. I tried to look at the tutorials also, couldnt find anything that will replace period to space. The information i am finding is changing hexadecimal to numeric, or something else.
thanks
thanks
-
- Charter Member
- Posts: 166
- Joined: Wed Mar 16, 2005 6:52 am
- Location: Mumbai, India
Shivan,
Are u working on a Server or a Parallel Job?
AFAIK Oconv cannot be used in a PX Transformer.
So if you are working in PX as the forum u've posted to would suggest, the second question would be: are you using a BASIC Transformer?
And finally in PX, the Box usually represents the (0x0) character.( the way DataStage pads CHAR fields by default).
The function we used to convert it to " " is
convert(char(000)," ", <In.CharField>)
If it is not a (0x0), then the number in the char() function will have to be replaced by the proper ascii value.
IHTH
Are u working on a Server or a Parallel Job?
AFAIK Oconv cannot be used in a PX Transformer.
So if you are working in PX as the forum u've posted to would suggest, the second question would be: are you using a BASIC Transformer?
And finally in PX, the Box usually represents the (0x0) character.( the way DataStage pads CHAR fields by default).
The function we used to convert it to " " is
convert(char(000)," ", <In.CharField>)
If it is not a (0x0), then the number in the char() function will have to be replaced by the proper ascii value.
IHTH
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>