Variable field calculation

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
js_j
Participant
Posts: 12
Joined: Fri Aug 19, 2011 5:04 am
Location: India

Variable field calculation

Post by js_j »

Hi,
The following is my file structure:
A B C D
2001;40S0;17.50;123456;
2001;500A;02.00;123456;
2001;50S0;16.50;123556; etc...

the required output is for every value of B in (40S0 and 500A) the corresponding C column values should be added for the same/different D column value.

In the Output i have an extra column YYYY to which the above calculation is mapped to. Input is dataset-->transformer-->dataset.

I am trying to use the transformer for the above. I am also open to using aggregator stage for the same.

Kindly let me know.

thanks,
JJ
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

This requires a classic fork-join design (though, once you're on version 8.5, you may be able to use looping constructs in the Transformer stage).
One side of the fork (Copy stage) leads to an Aggregator stage that performs the required calculation. The two streams are then united using a Join stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
js_j
Participant
Posts: 12
Joined: Fri Aug 19, 2011 5:04 am
Location: India

Post by js_j »

ray.wurlod wrote:This requires a classic fork-join design (though, once you're on version 8.5, you may be able to use looping constructs in the Transformer stage).
One side of the fork (Copy stage) leads to an Aggreg ...
Ok. But how do i implement the same in 7.5 version?
:)
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post by priyadarshikunal »

js_j wrote: Ok. But how do i implement the same in 7.5 version?
:)
Although I can't see the post from Ray (waiting for membership director's action), I can see Ray explaining classic fork-join using copy aggregator and join... I think all you have to do is read the message completely.. Or search for fork join to get some examples to move forward.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
js_j
Participant
Posts: 12
Joined: Fri Aug 19, 2011 5:04 am
Location: India

Post by js_j »

will try and get back.

thanks,
JJ
Post Reply