David,
You use %gx where x is a number of your choosing (I start with %g1 for the first group iteration, %g2 for the second, etc. – if multiple repeating groups or nested repeating groups exist).
For segments you would use %sx, fields %fx, and list %lx.
Once you use an iteration counter in the basis definition you cannot use it for another iteration (you might be able to define it but it probably won’t work right).
Don’t forget to use the iteration counter you define within the address path of the inbound fields as you apply Xlate Actions to them or you will always get just the first repetition. Depending on what you intend to do with the inbound field, you probably will also need to use the iteration counter in the outbound field address path in the Xlate Actions.
Jim Kosloskey
email: jim.kosloskey@jim-kosloskey.com 30+ years Cloverleaf, 60 years IT – old fart.