Hi everyone,
I have a file that needs to be split into multiple files. A code determines when the split will occur. The problem I'm having is the number of different codes varies each time I'll run the program. For example, one time the file may look like this:
Code1, Name, address, city st zip
Code2, Name, address, city st zip
Code3, Name, address, city st zip
So this file would need three output files. The next file may look like this:
Code1, Name, address, city st zip
Code2, Name, address, city st zip
Code3, Name, address, city st zip
Code4, Name, address, city st zip
Code5, Name, address, city st zip
So this file would need five output files.
Does anyone know how to code this? If it was a set number of output files each time it wouldn't be hard for me. But having a variable number of output files is causing me trouble. Any help is greatly appreciated.
Paul
I have a file that needs to be split into multiple files. A code determines when the split will occur. The problem I'm having is the number of different codes varies each time I'll run the program. For example, one time the file may look like this:
Code1, Name, address, city st zip
Code2, Name, address, city st zip
Code3, Name, address, city st zip
So this file would need three output files. The next file may look like this:
Code1, Name, address, city st zip
Code2, Name, address, city st zip
Code3, Name, address, city st zip
Code4, Name, address, city st zip
Code5, Name, address, city st zip
So this file would need five output files.
Does anyone know how to code this? If it was a set number of output files each time it wouldn't be hard for me. But having a variable number of output files is causing me trouble. Any help is greatly appreciated.
Paul
Comment