Mark,
Sometimes the issue is the data is contained in a single field and it is the field length not the segment length that becomes the issue.
The largest field defined in the HL/7 standard is 65k. However, in the Cloverleaf(R) variant one can make a field infinite in length.
It used to be you could do that via the GUI (the TK GUI) but I think the newer Java based Guis do not allow the specification necessary.
However, not all is lost. If you have a field that needs to be infinite, go into the HL/7 configurator for that variant and change the field in question to some length. That will create an entry for you in the field file in the formats directory for that variant and you can edit that with an editor (something I RARELY do) and change the length to the value for infinite.
Now the 64k question is what is that value? I seem to recall it is either 0 (zero) or -1 but maybe it is something else. I would try 0 (zero) from the GUI configurator and if the GUI does not let me change to that I would try that first (remember I said the GUI did not allow the proper change?). If the GUI allows specification of zero, try a message. If the mesage is truncated, try -1.
If the GUI does not allow 0 (zero) use the editor on the fields file and test. If that takes care of the problem – joy!.
If zero does not work, try -1. There IS a value that you can put in a field that allows it to be infinite.
To me that is a lot better than deploying Tcl for this issue.
email: jim.kosloskey@jim-kosloskey.com 29+ years Cloverleaf, 59 years IT - old fart.