Jon,
Welcome tothe wonderful world of ITERATE!!
First this is a field repetition.
So your basis is incorrect. It is at the group. Note the number after the .#7 in parentheses changing with each repetition. That is the field repeitiotn.
Your basis needs to go out to the field and you need to specify it as a field repetition and use a %f counter.
Big thing to remember – if your basis is not correct nothing related to the repitition will be correct. It is all important to get your basis corrrect.
Next in your COPY Actions on the Source side you need to use the %f counter you define in your basis in the parentheses after the .#7 (.#7(%f1) for example not PV1(%anything).
Don’t forget to use a counter on the Destination side as well.
However, it appears you only want those repetitions which meet certain criteria to be sent out so that means you wil need to manage a separate counter for the Destination side. This is more sophisticated and involves defining a %f counter which is NOT referenced in a ITERATE.
The general rule is if you want to reference an Iteration counter (whether one defined in a basis or not) you must place a $ in front (like this $%f1). When you want to use the counter in an address path then no $ (like this %f1).
So I like to use something like %f99. The 9x series usage is an eye catcher that indicates to me this must be a counter I am managing.
So you initialize your counter in the early part of your Xlate (like this COPY =0 –> $%f99).
Then where appropriate you increment the counter (like this MATH ADD =1 $%f99 –> $%f99).
Feel free to email me directly if you have further struggles and I will relate some tricks, etc.
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.