Originally posted by: edi1999
I have a map receiving an xml file and creating a flat file. My input file contains 3 lender loops and is the following format;
Input Output (repeated 3 times)
<lender> header record 1
<notice> header record 2
<notice> lender1
<lender> notice
<notice> notice
<lender> lender 2
<notice> notice
<notice> lender 3
notice
notice
I need to create 2 header records for each lender in the output file. I test for presence of <lender> and call a functional map. But my output is 2 header records, then all 3 lenders detail and it's repeated 3 times. I don't understand why it's not processing the first lender and when it hits </lender> it doesn't go back to the main map and start the next <lender> with the 2 header records? These are my 2 functional map calls;
=IF(PRESENT(lender:sequence:advanceNotice:global:Input), F_MakeClientLoop(global:Input, TIN_Table, SequenceNumber), NONE)
=IF(PRESENT(notice:sequence:lender:sequence:advanceNotice:Input), F_MakeNotice(notice:sequence:lender:sequence:advanceNotice:Input, TIN_Table, taxId:lender:sequence:advanceNotice:Input, NUMBERTOTEXT(INDEX(notice:sequence:lender:sequence:advanceNotice:Input))), NONE)
#IBM-Websphere-Transformation-Extender#DataExchange#IBMSterlingTransformationExtender