Splitting a file is useful when there is a size limit on your system or when you want to separate a file into manageable pieces. The pieces can later be reassembled using the Merge operation. You can specify the method for splitting the input file by the number of records or bytes per segment.
To split a file into multiple files
Example 1: Round Robin Keys
In this example, the input file will be split to Output 1 and Output 2 using the Round Robin Keys method, and Lev2_matched attribute as Match Key.
Input File
Name | Lev2_matched |
---|---|
B McCarthy | 000001 |
Bob McCarthy | 000001 |
Catherine Rogers | 000002 |
Cathy Rogers | 000002 |
On output, the program splits the input file; the first Lev2_matched group is written to Output 1, and the second Lev2_matched group is written to Output 2.
Output File 1
Name | Lev2_matched |
---|---|
B McCarthy | 000001 |
Bob McCarthy | 000001 |
Output File 2
Name | Lev2_matched |
---|---|
Catherine Rogers | 000002 |
Cathy Rogers | 000002 |
Example 2: Round Robin Number
In this example, the input file will be split to Output 1, Output 2 and Output 3 using the Round Robin Number method, and Round Robin Number is set to ‘1.’
Input File
Name | Lev2_matched |
---|---|
B McCarthy | 000001 |
Bob McCarthy | 000001 |
Catherine Rogers | 000002 |
Cathy Rogers | 000002 |
On output, record #1 is written to Output 1, record #2 is written to Output 2, and record #3 is written to Output 3. Since there are only three output files specified, record #4 goes back to Output 1, and the cycles continue in that order.
Output File 1
Name | Lev2_matched |
---|---|
B McCarthy | 000001 |
Cathy Rogers | 000002 |
Output File 2
Name | Lev2_matched |
---|---|
Bob McCarthy | 000001 |
Output File 3
Name | Lev2_matched |
---|---|
Catherine Rogers | 000002 |