If you’re already using an Xlate, I would probably wait until you COPY the OBX(s), then iterate/copy through the PID-NTE(s). Then iterate copy/through the OBX-NTE(s), but for the destination field, use the variable from the PID-NTE iterate (%s1), which you manually increment in the PRE.
You can do any iteration counter manipulation right within the Xlate (no Tcl required) if you like.
For example let’s say you want to maintain your own iteration counter (let’s say you are already using %s1 and %g1) – perhaps %s2.
Now let’s say you want to initialize %s2. You would do a COPY of =0 to $%s2 (note the $ in front of the counter).
To add one to the counter you would do a MATH ADD =1 $%s2 to $%s2 (again note the use of the $). To use the counter in an address path you need to remove the $ and just use %s2.
As Bill indicated you will need to maintain your own counter so that the reference to the outbound NTE segments following the OBX is independent of the inbound NTEs at either the PID or OBX.
Jim Kosloskey
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.
Author
Replies
Viewing 2 reply threads
The forum ‘Cloverleaf’ is closed to new topics and replies.