Loop Activity

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
Govindarajan
Participant
Posts: 24
Joined: Mon Jul 12, 2004 10:16 am

Loop Activity

Post by Govindarajan »

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
Last edited by Govindarajan on Thu Feb 14, 2008 1:25 pm, edited 1 time in total.
sud
Premium Member
Premium Member
Posts: 366
Joined: Fri Dec 02, 2005 5:00 am
Location: Here I Am

Re: Loop Activity

Post by sud »

Put the whole logic in a transformer. In fact if there is a relevance or logic to comput the thresholds 1000, 900 etc, even that can be built into the transformer.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
Post Reply