I am sorry for the confusion. Lets say the actual file has 5 blocks as shown below(each end of block is distinguished by a record having its first character as '5'). Now, I will be dividing this actual file into 4 smaller files
Step 1: Go through the file, find the first record having the first character as '5' and copy until then to first file.
Step 2:Copy the next block until you get first character as '5' into second file and so on until the entire file is divided into 4 smaller files in round robin fashion
Actual File:File1:1this is block 1 2this is block 1 3this is block 1 4this is block 1 2this is block 1 3this is block 1 5this is block 1 1this is block 2 2this is block 2 3this is block 2 2this is block 2 3this is block 2 5this is block 2 1this is block 3 2this is block 3 5this is block 3 1this is block 4 2this is block 4 5this is block 4 1this is block 5 3this is block 5 5this is block 5
File 2:1this is block 1 2this is block 1 3this is block 1 4this is block 1 2this is block 1 3this is block 1 5this is block 1 1this is block 5 3this is block 5 5this is block 5
File 3:1this is block 2 2this is block 2 3this is block 2 2this is block 2 3this is block 2 5this is block 2
File 4:1this is block 3 2this is block 3 5this is block 3
1this is block 4 2this is block 4 5this is block 4
In reply to Re^2: Splitting a Blocked file in Round Robin into smaller files
by tradersjoe0
in thread Splitting a Blocked file in Round Robin into smaller files
by tradersjoe0
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |