Are the pipes a result of an Xlate?
If so, then one way is to change the outbound variant so that any fields past the last one actually populated are not required.
If the Xlate sees any required fields it will add all of the intervening field separators as the field has to exist.
So say a segment with 3 fields:
Field_1 required
Field_2 optional
Field_3 required
If only Field_1 is populated by the Xlate (say with ‘stuff’ as the value) then the output would be:
SEG|stuff||
if the definition is changed to this:
Field_1 required
Field_2 optional
Field_3 optional
then the result would be:
SEG|stuff
Of course you could always write some tcl to be executed post Xlate but why?
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.