Calaculating ASCII value in datastage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Akhobare
Participant
Posts: 17
Joined: Mon Aug 17, 2009 8:24 am
Location: Pune

Calaculating ASCII value in datastage

Post 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.
Regards,
Akshay
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
Akhobare
Participant
Posts: 17
Joined: Mon Aug 17, 2009 8:24 am
Location: Pune

Post 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?
Regards,
Akshay
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Those two function are found under "Type conversion"
Post Reply