Function in datastage

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vijayindukuri
Participant
Posts: 66
Joined: Fri Nov 25, 2005 7:55 am

Function in datastage

Post by vijayindukuri »

Hi all
i have a scenario where i need to check for value which is comming from the source that is if the value is number like 23410 the value must be entered into to the target or if any bad number like 23456# comes from the source then it must be rejected and send into the error master table
Is this type of checking possible in datastage
Can any one help me in coding for this kind of situation
Luciana
Participant
Posts: 60
Joined: Fri Jun 10, 2005 7:22 am
Location: Brasil

Post by Luciana »

You can to use the NUM function (BASIC) for to check if the value is numeric.
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post by ds_developer »

Remember NUM will allow decimal point (.) and negative sign (-) as they are considered part of a normal datastage number.

John
Luciana
Participant
Posts: 60
Joined: Fri Jun 10, 2005 7:22 am
Location: Brasil

Post by Luciana »

Yes.
You can to use the Ereplace Function for to remove decimal point (.) and negative sign (-), before of to check if the value is numeric.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Luciana, I think that ds_developer's point is that strings with a "-" and "." (or a ',' if the NLS locale is enabled) will be returned as legal numeric, so you don't need to use an additional function to remove them.
Luciana
Participant
Posts: 60
Joined: Fri Jun 10, 2005 7:22 am
Location: Brasil

Post by Luciana »

Really, it is not necessary to remove the decimal point (.) and the negative sign (-).
Post Reply