to store column value of previous rec

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
karrisuresh
Participant
Posts: 57
Joined: Sat Jun 09, 2007 1:14 am
Location: chicago

to store column value of previous rec

Post by karrisuresh »

Hi
while loading the 7th rec, In the transformer I want to store the column value of 6th rec and add that column value to 7th rec based on certain condition and populate it to tgt,

Only thing is I am not getting idea as how to get the value of 6th rec which already populated into the tgt table just before this 7th record


Any help would be really great

Thanks
Suresh
Hi I have experience in parallel extender datastage I am ready to give/take help from other
hope we all help each other hand in hand
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

This is a classic example of the use of stage variables and works in both Server and PX jobs. If you have a stage var "LastValue = In.ColumnName" then any stage var defined before that assignment will have the value from the last value. In PX jobs you need to take the partitioning into account, though.
Post Reply