Page 1 of 1

Posted: Wed Sep 27, 2006 8:31 am
by ArndW
You can use the convert() function to replace that character with some other one.

Re: Specific character in string

Posted: Wed Sep 27, 2006 8:33 am
by DeepakCorning
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.

Re: Specific character in string

Posted: Wed Sep 27, 2006 8:51 am
by scognet
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

Re: Specific character in string

Posted: Wed Sep 27, 2006 8:58 am
by DeepakCorning
scognet wrote: In log of Director i ave just somme logs with "value too large" because i don't do correctly the substring.
Thanks
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.

Posted: Wed Sep 27, 2006 8:58 am
by ArndW
if you don't care what you convert it to to then use OCONV(In.ColumnName,'MCP') to convert unprintable characters to a "." (period).

Posted: Wed Sep 27, 2006 9:41 am
by DeepakCorning
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 !!

Posted: Wed Sep 27, 2006 11:22 am
by srinivas_dsx
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 !!
Adding to Deepak comments...

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

Posted: Thu Sep 28, 2006 3:30 pm
by ray.wurlod
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)