Page 1 of 1

condition check

Posted: Mon May 11, 2009 1:53 am
by chrisjones
Hi ,
I am getting some special characters in my source record so I want to check source record characters should be within A-Z,a-z and 0-9 if not then I treat as special charater record....can someone hlep how to write this range condition in datastage.

I tried below stuff in stage variable but not working

if link1.source=[A-Z] and [a-z] and [0-9] then 1 else 0.

Please advice

Re: condition check

Posted: Mon May 11, 2009 3:48 am
by nirdesh2
You can use Alpha() for checking A-Z & a-z and Num() function for checking 0-9 digits. I think this will help you to check any special character.

Re: condition check

Posted: Mon May 11, 2009 3:48 am
by nirdesh2
You can use Alpha() for checking A-Z & a-z and Num() function for checking 0-9 digits. I think this will help you to check any special character.

Posted: Mon May 11, 2009 4:03 pm
by ray.wurlod
Stage variable expressions do not use shell regular expressions, and in particular not range elements of regular expressions.

The AlNum() function reports whether its argument is alphanumeric.