EDIFACT
interchange files are composed of segments. Each segment ends with a segment delimiter. Therefore, it would be quite easy to write a small program to split your file into two or more smaller parts. Note that the segment delimiter can be chosen in the first segment (UNA
).
However, this splitting will affect the overall structure of your EDIFACT
file. It takes deaper knowledge of the interchange/message structure to find a viable split location.
The overall structure of an EDIFACT
interchange looks as follows:
Service String Advice UNA Optional
+----- Interchange Header UNB Mandatory
| +--- Functional Group Header UNG Conditional
| | +- Message Header UNH Mandatory
| | | User Data Segments As required
| | +- Message Trailer UNT Mandatory
| +--- Functional Group Trailer UNE Conditional
+----- Interchange Trailer UNZ Mandatory
If your big file contains many messages (starting with UNH
and ending with UNT
segments), you could split along the message boundaries and add artifical UNB/UNZ
envelopes.