source file having the data like aabbccc, i want target file
result like a1a2b1b2c1c2c3.
Answer Posted / srinivas
We can do this with below major steps.
i)First split the data into rows each character as one row this can be done by below function in basic trnsformer
Convert(@TM,@FM,Fmt('aabbccddee', "1T"))
ii)Then next step take four stage variables in next transformer apply below logics
stg1----> Outputcolumn of first transfermer.
stg2----> 1
stge3----> if stg4=stg1 then stg3+1 else stg2
stg4----> stg1
stge5----> stg1:stge3
now we will get the below ansr
o/p column
a1
a2
b1
b2
c1
c2
d1
d2
iii)Then convert the rows into one single column.
Thanks
Srini
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
Define Merge?
how to export or import the jobs in .ISX file
What are the components of datastage?
how to get sum of sal based on dept_no and then sum of all sal irrespective of dept_no in same sql. output:- 10, 200(sum of sal for dept_no 10), 5000(sum of all sal)
What are the steps needed to create a simple basic datastage job?
What is the difference between validated and compiled in the datastage?
What are the primary usages of datastage tool?
What is the process of killing a job in datastage?
Is the value of staging variable stored temporarily or permanently?
What is ds designer?
On which interface you will be working as a developer?
What is the difference between passive stage and active stage?
What are the components of ascential data stage?
Differentiate between datastage and datastage tx?
why do u need the IOS upgradation in a FC switch