If so then your control exists AFTER the segments have been built.
Typically that would be done with Tcl.
Another option is to define your outbound variant without the PV1 and PV2 segments. Then use PATHCOPY and copy the segments you want.
You could do the same PATHCOPY action as above without defining the outbound variant sans the PV1 and PV2 segments but I find having the variant definition match the receiving system’s need a good thing to do.
If you want to leave the PV1 and PV2 segments in place in the outbound variant, then I would suggest you make them optional and don’t copy anything to them.
Of course, you could always COPY each individual field with the variant defined either with or without the PV1 and PV2 segments defined.
Jim Kosloskey
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.