I have been tasked with taking a text file and creating a new text file output that has slightly different data based on what is in the original file.
I fully understand how to read a text file and write that data to a new text file. What I cannot fully understand is how to read a field in the original text file and create new data to put in the output file.
I have to look at a field called COUNTY and then determine if the value in the COUNTY field belongs in one of 4 different regions. Once I determine which region it belongs in I need to place that value in the new output file.
There are about 90 different counties and they are broken up into 4 regions(F1, F2, F3, F4). How would I go about grouping all of the counties into the proper region and then putting that into the new file as I read each record of the input file?
Any help would be appreciated. And if you need more information or a better explanation just ask!
I fully understand how to read a text file and write that data to a new text file. What I cannot fully understand is how to read a field in the original text file and create new data to put in the output file.
I have to look at a field called COUNTY and then determine if the value in the COUNTY field belongs in one of 4 different regions. Once I determine which region it belongs in I need to place that value in the new output file.
There are about 90 different counties and they are broken up into 4 regions(F1, F2, F3, F4). How would I go about grouping all of the counties into the proper region and then putting that into the new file as I read each record of the input file?
Any help would be appreciated. And if you need more information or a better explanation just ask!