need max value without sort stage

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
praburaj
Premium Member
Premium Member
Posts: 133
Joined: Thu Jun 30, 2005 1:26 am
Location: philippines

need max value without sort stage

Post by praburaj »

Hi,

We have developed the job. like this

OCI(Source)-->HASHFILE(Refere)-->TRAN-->SEQFILE-->AGR(SUM)--

>AGR(MAX)--->SORT-->TRANS-->HASH

We lookup the data in to transformer and these records are loaded into a

Sequence file. After that using the Aggregator, we found the Sum value

and once again we put another Aggregator, we found the Max value.

Then we used Sort Stage, then we got the Max Value.

Now, The problem is

Our client said, we don't need to use sort stage after 2nd

Aggregator. They expect the result direct from the 2nd Aggregator.

We tried to change. But till now , we did not get the exact value . We

need the result from only through 2nd Aggregator.

with Regards

prabhu


Can any one Suggest me. How can i do ? :(
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Re: need max value without sort stage

Post by DSguru2B »

praburaj wrote:After that using the Aggregator, we found the Sum value

and once again we put another Aggregator, we found the Max value.
Ok i am confused, you said in your descriptioin that you are getting the max value from the second aggregator and in your quest, you want to get max from the second aggregator without sorting. But arent you already doing that???
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
praburaj
Premium Member
Premium Member
Posts: 133
Joined: Thu Jun 30, 2005 1:26 am
Location: philippines

Re: need max value without sort stage

Post by praburaj »

yes, I did . Using the 2nd Aggregator , i maximize the value. Then i put

sorting stage and sort stage connected to Hashfile. Ok , data is coming

good. But now, we need to find the max data through 2nd Aggregator.

That means 2nd Aggregator will connect to Hash file. After the 2nd

Aggregator dont put any stage. That will connect only in Hash file. I tried

but i did not get correct result. :(

Any Solutions.
meena
Participant
Posts: 430
Joined: Tue Sep 13, 2005 12:17 pm

Post by meena »

Hi,

Do you think it is possible for you(with your specifications) to sort the data before doing the sum and max.I mean in the OCI stage to sort the data and do a look up and pass to aggregators.
praburaj
Premium Member
Premium Member
Posts: 133
Joined: Thu Jun 30, 2005 1:26 am
Location: philippines

Post by praburaj »

Hai meena,

Good news. Just now, i spoke to my client. I explained everything.

finally they accepted our job. Thanks for everyone :D

Regards,

prabu
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

You tell us, why you need the sort stage to store the data in the file. If your requirement is to find the max of the group, and that too, if you already found using the 2nd aggregator, I dont find a need to sort stage. If you give some example of what you expect, and what you get if sort stage is been removed, it will be easy.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Post Reply