Splitting Files
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
| 1. | Right-click the Merge/Split process and select Edit Process. The Options window opens. |
| 2. | Select Split or Both in the Process Type list box. If you select both, the utility runs the merge process first, then the split process. |
| 3. | If you select Both in Step 2, select an attribute from the drop-down list for Match key 1 - 5. |
| 4. | Select the Split Options tab. The Split Options window displays. |
| 5. | For Required partition method, select a method from the drop-down list. See split options. |
| 6. | (Optional) Specify input settings and output settings. |
| 7. | Click Finish. |
| 8. | From the Navigation View, right click the Merge/Split process and select Run. The Execute Process window opens. |
| 9. | Run the process now or schedule the process to run later. |
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 |