Are you using an Xlate?
If so, ITERATE through the OBX Group or Segment (depending on your variant).
Prior to the ITERATE COPY @null to a temp variable (eg @obx_5)
Inside the Xlate:
CONCAT @obx_5 ….OBX(.).#4 –> @obx_5 (with a separator of .br <– you might need to escape the like this \.br\)
AFTER the ITERATE COPY @obx_5 –> …OBX(.).#4
Replace the elipses and the . after the OBX inside the () in the Address Path so that it is proper addressing for your situation.
With each ITERATion the current positioned OBX-5 will be added to the temp variable with the .br separator. Thus the temp variable at the end of the ITERATion will have the total of all of the IB OBX-5 values each separated by .br.
So the temp variable then needs to be COPY’d to the single OBX-5 OB.
The above assumes there is no BULKCOPY involved nor is there a PATHCOPY for the OBX set in question which pre populates the OB OBX set.
If the above is not true, then more work is need to clear what the BULK/PATH copies have done vis-a-vis the OBX set.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.