I tried to do the following in the stage variable:
If NOT AlNum(LEFT(Lnk_Extract_Xrfm.MEMBNO,3))
then LEFT(Lnk_Extract_Xrfm.MEMBNO,3)
Else
If NOT AlNum(LEFT(Lnk_Extract_Xrfm.MEMBNO,2))
Then LEFT(Lnk_Extract_Xrfm.MEMBNO,2)
ELSE
IF NOT AlNum(LEFT(Lnk_Extract_Xrfm.MEMBNO,1))
Then LEFT(Lnk_Extract_Xrfm.MEMBNO,1)
ELSE ' '
Endif
Endif
Endif
However, during validate derivation its highlighting the function ALNUM ...any help would be appreciated.
Apparently not if the function isn't valid, never mind that you don't want to check for alphanumerics. That includes number and letters, you just want a numeric check.
-craig
"You can never have too many knives" -- Logan Nine Fingers
When I look at the data for this field I see that the first 3 one can expect to see Char fields and rest numbers.
So if only numbers come in then put spaces else extract the character.
Hence the need to check for All Numerics only....
I don't have my documentation here. Is AlNum a custom function at your shop? I'm assuming that "Al" means "Alpha" and thus it is an ALphaNUMeric check rather than an "All Numerics" check. Hence my earlier reply.
-craig
"You can never have too many knives" -- Logan Nine Fingers
DS_MJ wrote:"ALNUM" is a datastage string function for checking if a field is all Numeric.
No it isn't. Alnum() is a built-in DataStage function that reports whether a string of characters is wholly alphanumeric. Num() reports whether the string of characters validly represents a number (but this can include decimal placeholder).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.