Modifying Stage Variables

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
kevman
Premium Member
Premium Member
Posts: 2
Joined: Thu Jan 04, 2007 9:48 am
Location: Ottawa, ON

Modifying Stage Variables

Post by kevman »

Not sure if this is the correct forum, but here it goes ...
I have a Transformer set up with a stage variable. I am giving the variable an initial value, then I want to update it after every row is read. Is this possible? If not, any ideas on how to set up this scenario? Basically I am trying to keep track of a "control number" and reference/update it.

Thanks,

Kevin
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Sure, just pass the new value to the stage variable and it will be updated with the new value coming in with every row.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Kevin - welcome to DSXchange!

The server forum is more applicable to this question, but it isn't completely out of place in the General one.

If you specify "initial value" for a stage variable, that will only get executed one time. If you specify a derivation for a stage variable, it will be re-computed each row.
kevman
Premium Member
Premium Member
Posts: 2
Joined: Thu Jan 04, 2007 9:48 am
Location: Ottawa, ON

Post by kevman »

Thank you for your quick responses. It definately helped.

Kevin
Post Reply