EDI File Splitter
Main Features
- Split large EDI files into smaller, more manageable ones
- Split files at the Envelope (ISA), Functional Group (GS), or Transaction (ST) level
- Specify how many Functional Groups or Transactions should go in each file
- Customizable output filenames and extensions
- Auto placement of segment, transaction and functional group counts in the SE, GE and IEA segments
- Supports any X12 standard
Details
Unlock maximum data throughput by crushing massive payloads into agile, parallel streams. Processing large, monolithic EDI files often creates system bottlenecks. With EDIFileSplitter, you can instantly deploy high-speed, multi-threaded techniques to shatter giant files on an Interchange (ISA), Functional Group (GS), or Transaction (ST) level. By feeding smaller, highly optimized files into your downstream systems or parallel processing loops, you can slash overall load times and supercharge your architecture’s processing speeds.
Engineered for low overhead and maximum throughput, our architecture keeps memory usage entirely transient and decoupled from system RAM limitations. By allowing you to completely customize input and output buffer sizes, the engine drastically minimizes expensive I/O calls—slashing system latency and unleashing blistering runtime performance even under heavy corporate workloads.
Output file names and extensions are customizable. The current date can be appended to the name of each generated file. The date string is guaranteed to be unique.
Auto Placement of Number of Segments, Transactions and Functional Headers
Maintain flawless transactional integrity during the splitting process. When shattering giant data streams, EDIFileSplitter completely automates the tedious, error-prone math of recalculating your envelope trailers. The engine dynamically tracks segment counts on the fly and writes them directly into the child SE segments. Going a step further, it monitors multi-level metrics across your split files, automatically updating total transaction and group counts inside the newly generated GE and IEA segments to guarantee production-ready compliance out of the box.
The Code
EDIFileSplitter ediFileSplitter = new EDIFileSplitter();
// Split the file at the header level (ST segment)ediFileSplitter.FileSplitLevel = FileSplitLevel.HEADER;
// Place 2 ST headers per fileediFileSplitter.NumberOfItemsPerFile = 2;ediFileSplitter.OnFileOperationCompleted += new EventHandler(splitter_OnFileOperationCompleted);
try { string currentDirectory = Directory.GetCurrentDirectory(); ediFileSplitter.Split("837P_2ST_SE_Loops.txt", currentDirectory);} catch (Exception ex) { MessageBox.Show(ex.Message);}
private void splitter_OnFileOperationCompleted(object sender, FileOperationCompletedEventArgs e) { if (e.Status != FileOperationStatus.Success) { MessageBox.Show("Error splitting file", "Error"); } else if (e.Status == FileOperationStatus.Success) { MessageBox.Show("File Split Success", "Success"); }}
Example Usage with file
Whether you are optimization-tuning your pipeline or bypassing downstream system limitations, splitting massive EDI datasets is a critical operational need. EDIFileSplitter delivers a high-speed, enterprise-grade solution that handles this heavy lifting for you—shattering monolithic payloads into agile, compliant files with maximum efficiency.
The following EDI file is an X12 837P EDI file that contains 2 ST headers. This file can be split easily into two files with 1 ST header each.
ISA*00* *00* *ZZ*SMITH *ZZ*BCBSGA *07011A*1350*U*00401*000000011*1*P*>~GS*HC*SMITH*BCBSGA*20070118*1350*11*Y*004010X098A1~ST*837*000000001~BHT*0019*00*00000*20070118*1350*CH~REF*87*004010X098A1~NM1*41*2*ABC LABORATORY*****46*SMITH~PER*IC*JANE DOE*TQ*2127351234~NM1*40*2*A COMPANY*****46*00601~HL*1**20*1~NM1*85*2*ABC LABORATORY*****24*123456789~N3*112 ROAD WAY~HL*2*1*22*0~SBR*P*18*******CI~NM1*IL*1*SMITH*TEST****MI*505XXXX~N4*SPRINGFIELD*NY*11111~DMG*D8*19950101*F~NM1*PR*2*AMERIGROUP/MDGA MANAGED CARE*****PI*XX123A~N4*SOUTH BEACH*FL*23466~CLM*1-1178*126.84***81>>1*Y*A*Y*Y*B*AA>>>>>>REF*EW*004010X098A1~HI*BK>5990~LX*1~SV1*HC>87086*31.96*UN*1***1~DTP*472*D8*20070118~SE*227*000000001~ST*837*000000001~BHT*0019*00*00000*20070118*1350*CH~REF*87*004010X098A1~NM1*41*2*ABC LABORATORY*****46*SMITH~PER*IC*JANE DOE*TQ*2127351234~NM1*40*2*A COMPANY*****46*00601~HL*1**20*1~NM1*85*2*ABC LABORATORY*****24*123456789~N3*112 ROAD WAY~HL*2*1*22*0~SBR*P*18*******CI~NM1*IL*1*SMITH*TEST****MI*505XXXX~N4*SPRINGFIELD*NY*11111~DMG*D8*19950101*F~NM1*PR*2*AMERIGROUP/MDGA MANAGED CARE*****PI*XX123A~N4*SOUTH BEACH*FL*23466~CLM*1-1178*126.84***81>>1*Y*A*Y*Y*B*AA>>>>>>REF*EW*004010X098A1~HI*BK>5990~LX*1~SV1*HC>87086*31.96*UN*1***1~DTP*472*D8*20070118~SE*227*000000001~GE*1*11~IEA*1*000000011~
After using the EDIFileSplitter component the following two files are created:
ISA*00* *00* *ZZ*SMITH *ZZ*BCBSGA *07011A*1350*U*00401*000000011*1*P*>~GS*HC*SMITH*BCBSGA*20070118*1350*11*Y*004010X098A1~ST*837*000000001~BHT*0019*00*00000*20070118*1350*CH~REF*87*004010X098A1~NM1*41*2*ABC LABORATORY*****46*SMITH~PER*IC*JANE DOE*TQ*2127351234~NM1*40*2*A COMPANY*****46*00601~HL*1**20*1~NM1*85*2*ABC LABORATORY*****24*123456789~N3*112 ROAD WAY~HL*2*1*22*0~SBR*P*18*******CI~NM1*IL*1*SMITH*TEST****MI*505XXXX~N4*SPRINGFIELD*NY*11111~DMG*D8*19950101*F~NM1*PR*2*AMERIGROUP/MDGA MANAGED CARE*****PI*XX123A~N4*SOUTH BEACH*FL*23466~CLM*1-1178*126.84***81>>1*Y*A*Y*Y*B*AA>>>>>>REF*EW*004010X098A1~HI*BK>5990~LX*1~SV1*HC>87086*31.96*UN*1***1~DTP*472*D8*20070118~SE*227*000000001~GE*1*11~IEA*1*000000011~
ISA*00* *00* *ZZ*SMITH *ZZ*BCBSGA *07011A*1350*U*00401*000000011*1*P*>~GS*HC*SMITH*BCBSGA*20070118*1350*11*Y*004010X098A1~ST*837*000000001~BHT*0019*00*00000*20070118*1350*CH~REF*87*004010X098A1~NM1*41*2*ABC LABORATORY*****46*SMITH~PER*IC*JANE DOE*TQ*2127351234~NM1*40*2*A COMPANY*****46*00601~HL*1**20*1~NM1*85*2*ABC LABORATORY*****24*123456789~N3*112 ROAD WAY~HL*2*1*22*0~SBR*P*18*******CI~NM1*IL*1*SMITH*TEST****MI*505XXXX~N4*SPRINGFIELD*NY*11111~DMG*D8*19950101*F~NM1*PR*2*AMERIGROUP/MDGA MANAGED CARE*****PI*XX1D23A~N4*SOUTH BEACH*FL*23466~CLM*1-1178*126.84***81>>1*Y*A*Y*Y*B*AA>>>>>>REF*EW*004010X098A1~HI*BK>5990~LX*1~SV1*HC>87086*31.96*UN*1***1~DTP*472*D8*20070118~SE*227*000000001~GE*1*11~IEA*1*000000011~
