%dw 2.0
output application/java
fun pad12(a) = a as Number {format: "############.##"}
fun pad6(a) = a as Number {format: "######.##"}
fun concat(f) = f.InvDivTypeCde ++ pad12(f.AmountField1) ++ pad12(f.AmountField2)
---
using (u = in0.UlifeDataForPolicy) (u.PolicyNumber ++ u.FundCount ++ (u.*FundArray reduce ((val, acc = '') -> acc ++ concat(val))) ++ pad6(u.r2.r3.DepositAllocPct) ++ pad12(u.r2.r3.CurrentFaceAmt))
