In the source seq file have 2 columns, i.e
input:
col1,col2
1,1
2,rajesh
3,15000
4,2
5,suresh
6,16000
7,3
8,veeru
9,17000

I want in the output like:
eno,ename,sal
1,rajesh,15000
2,suresh,16000
3,veeru,17000

any one answer this scenario

Answer Posted / bharath

if inputlnk.col1%3= 1 then outputlnk.col1=inputlnk.col2
else inputlnk.col2


if inputlnk.col1%3= 2 then outputlnk.col2=inputlnk.col2
else inputlnk.col2

if inputlnk.col1%3= 0 then outputlnk.col3=inputlnk.col2
else inputlnk.col2

use above conditions in transformer stage
and then
change the column names using modify stage
as col1 = eno
col2 = ename
col3 = sal

let me know right answer, if i'm wrong...
..

Is This Answer Correct ?    3 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Could anyone give brief explanation bout datastage admin

1965


What is a merge?

666


Lookup constraints

836


Explain the situation where you have applied SCD in your project?

1558


Define Routines and their types?

618






What are the types of containers and how to create them?

556


How do you start developing a datastage project?

660


8000 jobs r there i given commit, suddenly job will abort? what happens? 2)diff b/t transformer stage & filter stage? 3)how to load the data in the source?

1778


Give an idea of system variables.

583


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

1627


What is the difference between in process and inter process?

663


What are the stages in datastage?

635


What are the components of ascential data stage?

645


What is ibm datastage?

601


How you Implemented SCD Type 1 & Type 2 in your project?

3695