We are trying to construct family interrelationship variables for a local household survey in order to analyze the health status of the parents of young children. We have found the documentation on https://usa.ipums.org/usa/chapter5/chapter5.shtml#APPEN very informative and useful. At this stage we are most interested in the MOMLOC and POPLOC variables. As the rules are quite complicate,we would really appreciate it if someone could share with us some code so that we can mimic. Your help would be greatly apprecaited. Thanks for your attention and look forward to hearing from you soon.