source file having the data like aabbccc, i want target file
result like a1a2b1b2c1c2c3.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / ramki
The same logic we can implement for as per the below Q
souce file having the columns like name company krish IBM
pooja TCS nandini WIPRO krish IBM pooja TCS if first row
will be repeat i want the result like this name company
count krish IBM 1 pooja TCS 1 nandini WIPRO 1 krish IBM 2
pooja TCS 2
Is This Answer Correct ? | 1 Yes | 4 No |
What are the components of datastage?
how to use self join using datastage ? can u tell me using stage how can we implemnet the self join
How can you join flat file, oracle as a sources?
Is the value of staging variable stored temporarily or permanently?
Difference between sequential file and data set?
How much data u can get every day? 2)which data ur project contains? 3) what is the source in ur project?what is the biggest table & size in ur schema or in ur project?
What are the types of containers?
What are the types of views in datastage director?
What are the important features of datastage?
source 1123445 I WANT OUTPUT AS DUPLICATES TO TARGET1 LIKE TARGET1 1144 NON-DUPLICATES TO TARGET2 TARGET2 235
How do you load 10 different sources with 10 different layouts to 10 different tables?
in source is like seq file in date column have dd-mm-yy dddd-mmmm-yyyy mm-dd-yy yy-dd-mm yy-mm-dd i want to display only yy-dd-mm date formats only in tgt?