Page 1 of 1

Datastage scenario

Posted: Mon Jan 27, 2014 4:00 am
by aschindler
Hi Team,

I have below requirement,please suggest approach to get desired output
input:
2
3
4
1
output:
2
2
3
3
3
4
4
4
4
1

Output should get the multiple values based on the value of input field.

Posted: Mon Jan 27, 2014 5:56 am
by RPhani
Hi,

Use Transformer Looping concept.

---------------------
RPhani

Posted: Mon Jan 27, 2014 6:17 am
by aschindler
Hi Phani,

I have tried this looping but could not achieve the desired result. Could you please explain me in detail what needs to be Done.

Thanks in Advance

Posted: Mon Jan 27, 2014 6:21 am
by RPhani
Hi,

1)Your DS version ?

--------------------------
RPhani

Posted: Mon Jan 27, 2014 9:09 am
by chulett
Could you please explain in detail to us what exactly it was that you tried? And what result you did achieve? We're here to help, not just hand over work. Have you gone through the help documentation on the Transformer Looping concept and the functions that support it? Lots of information there!

Posted: Tue Jan 28, 2014 1:40 am
by atul9806
For this scenario, try this code in transformer:

Code: Select all

Loop Condition :  LoopVar<=input
Loop Variables :
LoopVar + 1 = LoopVar
input = LoopVar1

Output :
LoopVar1 = output

Hoping this will work