Alpha Num and Alnum on empty string

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
sangi1981
Participant
Posts: 99
Joined: Fri Jun 13, 2008 8:10 am

Alpha Num and Alnum on empty string

Post by sangi1981 »

Hi All,
I have a question.
What is the behavior of function:

Code: Select all

 AlNum, 
 Alpha and 
 Num
functions when input column is an empty string!?
Thanks
manoj_23sakthi
Participant
Posts: 47
Joined: Tue Feb 23, 2010 12:16 am
Location: CHENNAI

Re: Alpha Num and Alnum on empty string

Post by manoj_23sakthi »

it gives false (0).
I think you are discuss about null string .
sangi1981
Participant
Posts: 99
Joined: Fri Jun 13, 2008 8:10 am

Post by sangi1981 »

Ok thank you.
I discuss about not input column with null string, checked by IsNull(),
but about input column that may contain empty string, checked using function: Num(), Alpha(), Alnum().
So, if I have an empty string, like "", this functions return false (0)?
Ravi.K
Participant
Posts: 209
Joined: Sat Nov 20, 2010 11:33 pm
Location: Bangalore

Post by Ravi.K »

Yes, the functions returns "0" if the input string is empty.
Cheers
Ravi K
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The most reliable is Len(InLink.TheString) which returns 0 for "" and a non-zero value for any other non-null string.
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