Mike,
Is the string mapping you speak of done prior to the Xlate or inside the Xlate?
You will need to have your own ITERATE counter/variable.Since this is a field repetition then something like %s99 (I like to start my own counters at 99 but you can use any unused value). This counter will be used to indicate which NTE repetition outbound is being built.
At the beginning of your Xlate COPY =0 to $%s99 (note the $).
If prior to the Xlate, then
– make sure the NTE-3 is defined as repeating in the IB Variant.
– ITERATE over the NTE-3 (let’s say the ITERATE counter here is %f1).
– inside the ITERATE:
– COPY all of the NTE stuff you need using %f1 in the IB address path and %s99 in the OB address path (at the segment level).
– MATH ADD =1 $%s99 –> $%s99 (This increments the outbound counter for the next segment).
If inside the Xlate then you will need to split the NTE-3 on .br creating a list (if 6.1.0 or later you can use the STRING Action with the appropriate function).
Then you will need some tcl to pop each element of the list. This would be inside a LIST ITERATE which needs to be controlled. Most of the above stuff for building the NTE segments will be the same except the ITERATE Counter will be %l1 but the OB counter will still be %s99 but the source will be the list created by the split.
If you want more detail or assistance, feel free to email me.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.