Page 1 of 1

Calaculating ASCII value in datastage

Posted: Wed Aug 18, 2010 2:38 am
by Akhobare
Hi,

We need to get the ASCII values of incoming data to check whether they represent special chareacters.

There seems to be function 'ASCII' and has couple of help pages in DataStage on that; but in tramsformer we are not able to use it. Transformer shows error like ' ASCII not defined.'

So is it like we can use ASCII function only in datastage subroutine or thre is no function called ASCII in datastage. How can i calculate ASCII values of characters in transformer?

Thanks in advance.

Posted: Wed Aug 18, 2010 3:52 am
by ArndW
The function you are looking for is SEQ(), which will return the numeric representation of the input single character, the function that returns a character given a numeric representation is CHAR(). Both can be looked up in the documentation and exist in both Server and Parallel versions.

Posted: Wed Aug 18, 2010 4:50 am
by Akhobare
ArndW wrote:The function you are looking for is SEQ(), which will return the numeric representation of the input single character, the function that returns a character given a numeric representation is CHAR(). Both can be looked up in the documentation and exist in both Server and Parallel versions.
Thanks for your reply. It indeed works. :)

DO we have more such functions which are not specified in Transformer-->column-->Function? Any link?

Posted: Wed Aug 18, 2010 5:01 am
by ArndW
Those two function are found under "Type conversion"