A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.
Moderators: chulett , rschirm , roy
karthi_gana
Premium Member
Posts: 729 Joined: Tue Apr 28, 2009 10:49 pm
Post
by karthi_gana » Tue May 11, 2010 6:50 am
All,
I have a file which will be uploaded into a table.
say for example
Eno char 5
DOB datetime
Salary decimal 18,6
1
01/01/1970
12000
Incase if i have bad data like
2
M -- Should be datetime
A -- Should be decimal
I have to check the above and need to reject this row.
How?
Inputs are welcome!
Karthik
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue May 11, 2010 7:05 am
Server has several functions that could help with this, check out Num() (etc) or find Ray's free Server version of the PX IsValid() function.
-craig
"You can never have too many knives" -- Logan Nine Fingers
karthi_gana
Premium Member
Posts: 729 Joined: Tue Apr 28, 2009 10:49 pm
Post
by karthi_gana » Tue May 11, 2010 7:19 am
chulett wrote: Server has several functions that could help with this, check out Num() (etc) or find Ray's free Server version of the PX IsValid() function. ...
i tried like
not(num(salary)) in the transofrmer...
but no use...
it is not rejecting the rows...
Karthik
nagarjuna
Premium Member
Posts: 533 Joined: Fri Jun 27, 2008 9:11 pm
Location: Chicago
Post
by nagarjuna » Tue May 11, 2010 8:42 am
In a parallel job , sequential file automatically rejects . Put a reject link and collect records which are having bad data .
Nag
Sainath.Srinivasan
Participant
Posts: 3337 Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom
Post
by Sainath.Srinivasan » Tue May 11, 2010 9:01 am
Maybe you need to say what you have tried including stage, variables, constraints and sample data.
chulett
Charter Member
Posts: 43085 Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO
Post
by chulett » Tue May 11, 2010 9:29 am
nagarjuna wrote: In a parallel job , sequential file automatically rejects . Put a reject link and collect records which are having bad data .
How is that going to help someone with a Server job?
-craig
"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607 Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:
Post
by ray.wurlod » Tue May 11, 2010 4:35 pm
karthi_gana wrote: i tried like
not(num(salary)) in the transofrmer...
but no use...
it is not rejecting the rows...
Show us the precise constraint expressions you are using.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.