Page 1 of 1

Unable to replace special characters in datastage 8.7 Versio

Posted: Sat Dec 13, 2014 10:39 pm
by kiranh_1214
Hi,

In datastage 7.5 version installed on windows there are special characters or may be they are unicode representations whiich are like
"..:" "-" "-->".
In 7.5 server jobs the above characters are replaced using rreplace function of char(9) char(10).Char(13) char(26).

when i tried to replicate the same derivation in 8.7 parallel jobs the symbols are not getting replaced instead the alphabets are getting replaced.

Tried to print the characters in datastage using Char function but was not possible.
i think the char function will only take a decimal input and not hexadecimal input.
Is there any environmental variable to handle this.
request your suggestions on how to handle this scenario.

Posted: Sat Dec 13, 2014 10:42 pm
by ray.wurlod
Search this site for a parallel version of the Ereplace() function. It's not available out of the box in version 8.x, but it's been created for the DSXchange community. From memory it's called pxEreplace().

Posted: Sun Dec 14, 2014 10:19 am
by chulett
I'm a little lost... why not show us the code you are using? What are you trying to replace them with or are you in fact trying to strip them? Also unclear why you would be worried about hexadecimal anything when all characters have a decimal equivalent. EReplace is useful when you need to replace a string, if all you need to do is replace individual characters you have convert for that.

Just as an FYI the four characters you listed - 9 is a tab, 10 is a line feed, 13 is a carriage return and 26 is a sub or EOF. Trying to print them using CHAR() isn't really going to help, I would think... try SEQ() for that instead.

Posted: Tue Dec 23, 2014 8:28 am
by priyadarshikunal
seq() function should be used to generate the ASCII value not the char function which does just opposite task to convert ASCII value to character. If you need to perform character by character conversion, why not use double converts(try searching for the examples)? if it is string replacement, try searching for PxEreplace as already mentioned by Ray.