condition check

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
chrisjones
Participant
Posts: 194
Joined: Thu May 11, 2006 9:42 am

condition check

Post 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
Thanks,
Chris Jones
nirdesh2
Participant
Posts: 56
Joined: Thu Nov 20, 2008 12:18 pm
Location: Noida

Re: condition check

Post 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.
Nirdesh Kumar
nirdesh2
Participant
Posts: 56
Joined: Thu Nov 20, 2008 12:18 pm
Location: Noida

Re: condition check

Post 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.
Nirdesh Kumar
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply