I have a file (70,000 records) in which family members are identified by shared Household Numbers. One person (Head) in each household has an occupation. Let's say Farmer is assigned 1 and Fisherman is assigned 2.
Making an assumption that all members of each household are economically dependent on the Head I want to assign a common value to all. So, if the household number is 375 and the Head's value is 2 then I want all of the other members of the household to be given the value 2. Move on to household number 376 and value 1 etc.
I'm a novice at this. I'm guessing that the code would be some sort of for next loop which would take the assigned value of the Head in the set of records and do while the household number is the same, i.e. Apply the same value to all of the others in the household. Then loop around to take on the next household number?
Any guidance would be much appreciated.
Making an assumption that all members of each household are economically dependent on the Head I want to assign a common value to all. So, if the household number is 375 and the Head's value is 2 then I want all of the other members of the household to be given the value 2. Move on to household number 376 and value 1 etc.
I'm a novice at this. I'm guessing that the code would be some sort of for next loop which would take the assigned value of the Head in the set of records and do while the household number is the same, i.e. Apply the same value to all of the others in the household. Then loop around to take on the next household number?
Any guidance would be much appreciated.
Comment