Bob,
OK
Does the message that contains the ZPA also contain OBX segments?
If so, do the OBX segments generated by the ZPA need to go in any particular place in relationship to the existing OBX segments or can they just go at the end?
If there are existing OBX segments and the ZPA generated OBX segments can follow them – you would ITERATE over te OBX segments inbound creating OBX segments outbound and keeping track of the iteration counter (say with something like %g99 – your counter) associated with the inbound OBX so you know where to start the ZPA generated OBX segments (both from a counter position and for sequence numbering) .
Then you would have a set of COPYs for each of the ZPA fields that need to generate an OBX segment. Increment the %g99 counter and use it in the outbound OBX path to point to then proper OBX position and use %g99 (probably with a MATH ADD) to get the sequence number for each new OBX.
If there are no inbound OBX segments, then just do the COPYs for each ZPA field as above again using something like %g99 as the counter but starting with zero.
There are other discussions on this forum that talk about how to manage your own iteration counters but essentially you need a $ at the front ($%g99 for example) when referencing the counter in an Xlate Action (COPY, MATH, etc.) but no $ (%g99 for example) when using the counter in the address path of a field.
If there are existing inbound OBX segments but the ZPA generated OBX segments want to go somewhere besides after the inbound OBX segments then the above logic will need to be adapted.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.