Specific character in string
Moderators: chulett, rschirm, roy
You can use the convert() function to replace that character with some other one.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 503
- Joined: Wed Jun 29, 2005 8:14 am
Re: Specific character in string
When you say you have a problem , do you mean that you are getting some kind of warning while running the Job? If yes can you please let us know the warning/error message.
Usually you have to make changes in the NLS setting of the jobs to handle special character, but can not comment till I see the warnign message.
Usually you have to make changes in the NLS setting of the jobs to handle special character, but can not comment till I see the warnign message.
Re: Specific character in string
I have no good result with "Ereplace" or "Convert" function because i think i'm in front of difference between DOS and UNIX character.
In log of Director i ave just somme logs with "value too large" because i don't do correctly the substring.
Thanks
In log of Director i ave just somme logs with "value too large" because i don't do correctly the substring.
Thanks
-
- Premium Member
- Posts: 503
- Joined: Wed Jun 29, 2005 8:14 am
Re: Specific character in string
Can you put a Seq or Hashed File and pull out this value in it. That will give an idea what exactly what is going in to the target.scognet wrote: In log of Director i ave just somme logs with "value too large" because i don't do correctly the substring.
Thanks
if you don't care what you convert it to to then use OCONV(In.ColumnName,'MCP') to convert unprintable characters to a "." (period).
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Premium Member
- Posts: 503
- Joined: Wed Jun 29, 2005 8:14 am
-
- Premium Member
- Posts: 7
- Joined: Thu Nov 17, 2005 12:00 pm
Adding to Deepak comments...DeepakCorning wrote:Just wanted to ask you that are you sure you will never have any other special cahracters other than what you specified here?? If yes then the above solution is perfect !!
Usually these characters are from European character set and are called "diacritic" characters. It is possible that if one creeps in other will follow. We had a similar issue, but our issue started when we converted from non-NLS to NLS. Deepak is right in pointing out that we need more information about your situation.
Assuming that you are using NLS, one cautious option would be to look at using Unicode character set/code page to resolve this issue. If your setup is non-NLS then it should be straight forward as others suggested.
Srinivas
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
There is no out-of-the-box function for detecting non-printing characters unless NLS is enabled. But you could write your own.
Code: Select all
FUNCTION IsPrintable(TheString)
* Returns 1 (true) if the string contains only printable characers, 0 otherwise
Ans = ((TheString) = Oconv((TheString),"MCP")
RETURN(Ans)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.