Help me asap

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
kuths
Participant
Posts: 1
Joined: Tue Mar 31, 2009 5:05 am
Location: mumbai

Help me asap

Post by kuths »

Hi,

I am getting files from 2 source, each sending some data.
My job is to take these 2 files and identify a row starting from 98 as shown below in each of the file.

File1: 98,123000000,12,12
File2: 98,123,12,12

Now the data after the first comma(,) is amount and I need to add them and finally generate a new file with the value as below. I don't know the exact length of bolded values since its amount field.

Final File: 98,123000123,12,12

Please advice me.
gssr
Participant
Posts: 243
Joined: Fri Jan 09, 2009 12:51 am
Location: India

Post by gssr »

You can use the Aggregator Stage with first column as key and get the sum of the second column
RAJ
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

"Help me asap"? If you tell us what asap means as a verb, then perhaps we may be able to help one or more ways in which you can, actually, asap.

DSXchange is an all-volunteer site whose members post when and if they can. It is not a substitute for official support. We do not do "urgent" in any form and, indeed, find it offensive. If you want "urgent" or "asap", sign up with your support provider for priority service, and learn just how much "urgent" costs.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Why would you think you'd need to know the "exact length"? It's just a csv file, the Sequential File stage will worry about that. :?
-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 »

Sort funnel the rows from the two sources then use Aggregator stage as suggested. If you only want 98 as output, use a Switch, Filter or Transformer stage to effect the desired filtering.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply