Stage variables reset to initial value

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
chetan.c
Participant
Posts: 112
Joined: Tue Jan 17, 2012 2:09 am
Location: Bangalore

Stage variables reset to initial value

Post by chetan.c »

Hi,

Are stage variables reset to initial value as defined in stage variable property after each row is written out or it holds the value from the processing even after the row is written out?


Thanks.
Chetan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Initial value? No. They are updated for each row processed through the transformer but they only get their initial value once. Hence the name.

Why do you asK?
-craig

"You can never have too many knives" -- Logan Nine Fingers
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

Here's a link to the documentation page (for IS 8.5) describing the order of execution of a parallel transformer's logic. For pre-8.5 releases, you can ignore the looping example.


Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
chetan.c
Participant
Posts: 112
Joined: Tue Jan 17, 2012 2:09 am
Location: Bangalore

Post by chetan.c »

chulett wrote:Why do you asK?
Thanks.
So after a row is written out the stage variable is empty or does it hold the earlier value?

Trying to have a better understanding of stage variables so asked. :)
chetan.c
Participant
Posts: 112
Joined: Tue Jan 17, 2012 2:09 am
Location: Bangalore

Post by chetan.c »

Hi James

Thanks for the link.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Stage variables are not cleared between rows. When a stage variable is yet to be evaluated for the current row it contains its value from the previous row (or its initial value if the row being processed is row number 1 on its node).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chetan.c
Participant
Posts: 112
Joined: Tue Jan 17, 2012 2:09 am
Location: Bangalore

Post by chetan.c »

Thanks ray.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

chetan.c wrote:Trying to have a better understanding of stage variables so asked. :)
No worries, just wanted to make sure there wasn't an actual problem lurking under there. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply