Loop Activity
Posted: Thu Feb 14, 2008 11:37 am
Can anybody suggest a method for below question!!!!
Source Data (today's load):
ItemCode TotalQty
01 (1000) - negative value
My target is (existing Data)
ItemCode Sequence Qty Net
01 1 100 100
01 2 300 400
01 3 450 850
01 4 500 1350
01 5 150 1500
My Target should be updated like this
ItemCode Sequence Qty Net
01 1 0 900(100<1000 then make it 0 and net is 1000-100)
01 2 0 600(300<900 then make it 0 and net is 900-300)
01 3 0 150(450 < 600 then make it 0 and net is 600-450)
01 4 350 0(150 !<500 then 500-150 =350 net is 0)
01 5 150 (no need to subtract)
How do I implement this in Datastage PX job?
thanks
Govindarajan.T
Source Data (today's load):
ItemCode TotalQty
01 (1000) - negative value
My target is (existing Data)
ItemCode Sequence Qty Net
01 1 100 100
01 2 300 400
01 3 450 850
01 4 500 1350
01 5 150 1500
My Target should be updated like this
ItemCode Sequence Qty Net
01 1 0 900(100<1000 then make it 0 and net is 1000-100)
01 2 0 600(300<900 then make it 0 and net is 900-300)
01 3 0 150(450 < 600 then make it 0 and net is 600-450)
01 4 350 0(150 !<500 then 500-150 =350 net is 0)
01 5 150 (no need to subtract)
How do I implement this in Datastage PX job?
thanks
Govindarajan.T