Page 1 of 1

Logoc Question - Looping

Posted: Thu Dec 17, 2009 7:44 am
by Raftsman
I have a requirement to produce multiple records from one input.

i.e. ColA ColB Low High

EE AA 10 12

My requirement is to end up with the following


EE AA 10
EE AA 11
EE AA 12

For each input I must create multiple records that fall between the low and high of the input record. I tried using a range lookup but I can't seem to figure out how to add to my counter.

Has anyone designed logic using DS or must I create a BuildOp

Thanks in advance

Posted: Thu Dec 17, 2009 10:50 am
by priyadarshikunal
well, a routine can return you comma seperated numbers like
input 10 and 12 -> 10,11,12
and then pivot stage will do the rest.

Just a thought.

Posted: Thu Dec 17, 2009 12:11 pm
by Raftsman
After reviewing the task, I created a Temp file that contains all sequence numbers between 1 and 20. Using this, I do a range lookup comparing the values between the low and high, funnel the records back into the stream and I get my result.

It's not pretty but it works.

Thanks