Looping in Transformer stage

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
pillip
Premium Member
Premium Member
Posts: 50
Joined: Thu Dec 10, 2009 10:43 am

Looping in Transformer stage

Post by pillip »

Hi,

I would like to generate multiple rows from a single row and each row is dependent on the previous row. I have implemented this using stage variables by storing the values of prev and curr record. For looping I have used a constraint which increments the count and checks for the required count.
But I find that this constraint doesnt loop back to the stage variables for implementing the looping. It executes only for the current record.
Can you let me know how to loop back to the stage variables for calculating the next recrod.
I am using 8.1 version which does not have the in built looping option.
bhasds
Participant
Posts: 79
Joined: Thu May 27, 2010 1:49 am

Post by bhasds »

Hi pillip,

Could you please post some sample input records and the desired output.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Looping in Transformer stage

Post by chulett »

pillip wrote:For looping I have used a constraint which increments the count and checks for the required count.
This is confusing as constraints can't increment anything, all they do is evaluate an expression for true/false and if true allow a record to pass through. And you can't do any "looping" in the transformer until you upgrade to a version that supports it.

As noted, details would help. Show us some sample input records and what the corresponding output records need to look like. Then detail what you've done so far with the stage variables.
-craig

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