Need to capture a running total at the end of a transform

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

sendmk
Charter Member
Charter Member
Posts: 136
Joined: Mon Oct 03, 2005 5:02 am

Post by sendmk »

how to cal sum of n rows using stage variables,

i searched the forum,but could not find
sendmk
Charter Member
Charter Member
Posts: 136
Joined: Mon Oct 03, 2005 5:02 am

Post by sendmk »

how to cal sum of n rows using stage variables,

i searched the forum,but could not find
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Running total is easy. If you have a column In.Col1 that you want a running total on, create a stage variable "RunningTotal" and just assign "RunningTotal + In.Col1" to it and output that to a column.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Running total is easy. If you have a column In.Col1 that you want a running total on, create a stage variable "RunningTotal" and just assign "RunningTotal + In.Col1" to it and output that to a column.
Post Reply