Page 1 of 1

Previous record

Posted: Tue Jul 14, 2009 1:12 pm
by datastagenewbie
How do I get previous record and next record info in DataStage Parallel job ?

Posted: Tue Jul 14, 2009 1:32 pm
by chulett
You don't, really. Stage variables can store values from a 'previous' record, however. What are you trying to do?

Posted: Tue Jul 14, 2009 1:37 pm
by datastagenewbie
I need a column value of the previous record. If the value is the range then I will do additional processing(setting a flag) to the current record.

Posted: Tue Jul 14, 2009 2:08 pm
by chulett
OK, very common requirement. Stage variables in a Transformer will let you do that easily. Ever used them before?

Posted: Tue Jul 14, 2009 2:14 pm
by datastagenewbie
I've never used them. But I think I can find some help in the dox and use them.
Thank you very much.

Posted: Tue Jul 14, 2009 2:21 pm
by chulett
Keep in mind they are processed top to bottom, which is key here, so make sure the one you use to store the 'previous' value is last in the order listed.

Posted: Tue Jul 14, 2009 3:18 pm
by datastagenewbie
Thank you!