Previous record

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
datastagenewbie
Participant
Posts: 64
Joined: Tue Sep 23, 2008 9:54 am

Previous record

Post by datastagenewbie »

How do I get previous record and next record info in DataStage Parallel job ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You don't, really. Stage variables can store values from a 'previous' record, however. What are you trying to do?
-craig

"You can never have too many knives" -- Logan Nine Fingers
datastagenewbie
Participant
Posts: 64
Joined: Tue Sep 23, 2008 9:54 am

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK, very common requirement. Stage variables in a Transformer will let you do that easily. Ever used them before?
-craig

"You can never have too many knives" -- Logan Nine Fingers
datastagenewbie
Participant
Posts: 64
Joined: Tue Sep 23, 2008 9:54 am

Post 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.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
datastagenewbie
Participant
Posts: 64
Joined: Tue Sep 23, 2008 9:54 am

Post by datastagenewbie »

Thank you!
Post Reply