on 12-17-2009 10:41 AM
Dear Gurus,
I have the below requirement -
Source side I have a segment S1 which has cardinality 0 to 99 , I have a field f1 under S1 and I have a segment S2 under S1 which has cardinality 0 to 999 and under S2 segment I have field f2 . In the target side I have a segment T1 which has cardinality 0 to unbounded and under T1 i have the field f3 . I have to concatenate and map all the corresponding values of f2 to target field f3 when f1 has value "001" .
The permissible input file -
S1
-- f1=005
--S2
--f2=abcd
--S2
--f2=efgh
S1
-- f1=001
--S2
--f2=1234
--S2
--f2=5678
S1
-- f1=006
--S2
--f2=ijkl
--S2
--f2=mnop
Permissible Output file -
T1
--f3=12345678
i.e. Here the target field f3 should have the value "12345678" .
Here my key concern is how can we identify the S2's f2 values that corresponds to f1=001 of S1 segment ?
Could anyone help me out in this issue
Thanks & Regards,
Sarat
Thanks Ravi and Suraj for your timely help .
Regards,
Sarat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sarat,
This can be achieved using a combination of graphical mapping and a UDF.
YOu can try the following
F1 ----------
\ Equals--------
001(Constant) \ Ifwithoutelse -> UDF Concatenate - > Output
F2
Here, F2 must have the context of S1
Concaenating Let me know if you need the cde to concatenate the values of the same queue
Regards,
Ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ravi,
Thanks for the reply but here the catch is that I want to concatenate all the values of F2 from segment S2 whose S1 segment's F1 value is 001 . But in the solution that you provided after checking the condition you are passing all the values of F2 to the UDF but I require only corresponding F2 values .
Regards,
Sarat
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.