in datastage interview qustion

source target
------- -------
12345 1
2
3
4
5

Answer Posted / subbuchamala

SRC-->TFM--->TGT
in TFM, Use Stage variables and Loop variables as below:

StageVar-->Len(Lnk.Source)===>this will give length of string of "Source" column. i.e.,

Source StageVar
12345 5


Next, in the Loop variable part:
Loop While==> @ITERATION<= StageVar
For input row, Loop will repeat until "Source" length(5) finishes.

Add new Loop variable-->LoopVar and put below derivation:
Left(Lnk.Source, @ITERATION)-->LoopVar

Next, in the Output Col Derivation:

LoopVar-->Target
Ex:
For 1st ITERATION: Left("12345", 1)==>1
For 2nd ITERATION: Left("12345", 2)==>2
....
....
Finally, you will required Output.

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how a source file is populated?

757


im new to this tool im now at project plz tell me step by step process how to design plz help me i wnt to go with exp for job plz give me d proper design and explination

1619


what is ds administrator used for?

711


Differentiate between odbc and drs stage?

584


What is "fatal error/rdbms code 3996" error?

657






If you want to use the same piece of code in different jobs, how will you achieve it?

625


tell me 5 situations when we r using oracle db stages like orecle connector, oracle enterprise

2694


what are the devoleper roles in real time? plz tell i am new to datastage....

1630


what is repositery?

1285


Describe routines in datastage? Enlist various types of routines.

571


What is ibm datastage flow designer?

676


What is the difference between the local container and shared container?

639


What is data partitioning?

737


What are the steps needed to create a simple basic datastage job?

646


which r the connectors used in san?

1783