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


Please Help Members By Posting Answers For Below Questions

Define Merge?

1082


how to export or import the jobs in .ISX file

954


What are the components of datastage?

870


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)

718


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

889


What is the difference between validated and compiled in the datastage?

903


What are the primary usages of datastage tool?

860


What is the process of killing a job in datastage?

768


Is the value of staging variable stored temporarily or permanently?

770


What is ds designer?

857


On which interface you will be working as a developer?

837


What is the difference between passive stage and active stage?

1092


What are the components of ascential data stage?

884


Differentiate between datastage and datastage tx?

835


why do u need the IOS upgradation in a FC switch

2057