Matching Cohabitating Partners to Their Characteristics in the NLSY97

1st partner from household roster (Step 6)

array hhuid (10, 17)
HHI2UID01_97 HHI2UID02_97 HHI2UID03_97 HHI2UID04_97 HHI2UID05_97
HHI2UID06_97 HHI2UID07_97 HHI2UID08_97 HHI2UID09_97 HHI2UID10_97 HHI2UID11_97 HHI2UID12_97 HHI2UID13_97 HHI2UID14_97 HHI2UID15_97 HHI2UID16_97 HHI2UID17_97
HHIUID01_98 HHIUID02_98 HHIUID03_98 HHIUID04_98 HHIUID05_98 HHIUID06_98 HHIUID07_98 HHIUID08_98 HHIUID09_98 HHIUID10_98 HHIUID11_98 HHIUID12_98 HHIUID13_98 HHIUID14_98 blank blank blank
HHIUID01_99 HHIUID02_99 HHIUID03_99 HHIUID04_99 HHIUID05_99 HHIUID06_99 HHIUID07_99 HHIUID08_99 HHIUID09_99 HHIUID10_99 HHIUID11_99 HHIUID12_99 HHIUID13_99 HHIUID14_99 blank blank blank
HHIUID01_00 HHIUID02_00 HHIUID03_00 HHIUID04_00 HHIUID05_00 HHIUID06_00 HHIUID07_00 HHIUID08_00 HHIUID09_00 HHIUID10_00 HHIUID11_00 HHIUID12_00 HHIUID13_00 HHIUID14_00 blank blank blank
HHIUID01_01 HHIUID02_01 HHIUID03_01 HHIUID04_01 HHIUID05_01 HHIUID06_01 HHIUID07_01 HHIUID08_01 HHIUID09_01 HHIUID10_01 HHIUID11_01 HHIUID12_01 HHIUID13_01 HHIUID14_01 HHIUID15_01 HHIUID16_01 blank
HHIUID01_02 HHIUID02_02 HHIUID03_02 HHIUID04_02 HHIUID05_02 HHIUID06_02 HHIUID07_02 HHIUID08_02 HHIUID09_02 HHIUID10_02 HHIUID11_02 HHIUID12_02 HHIUID13_02 blank blank blank blank
HHIUID01_03 HHIUID02_03 HHIUID03_03 HHIUID04_03 HHIUID05_03 HHIUID06_03 HHIUID07_03 HHIUID08_03 HHIUID09_03 HHIUID10_03 HHIUID11_03 HHIUID12_03 HHIUID13_03 blank blank blank blank
HHIUID01_04 HHIUID02_04 HHIUID03_04 HHIUID04_04 HHIUID05_04 HHIUID06_04 HHIUID07_04 HHIUID08_04 HHIUID09_04 HHIUID10_04 HHIUID11_04 HHIUID12_04
blank blank blank blank
HHIUID01_05 HHIUID02_05 HHIUID03_05 HHIUID04_05 HHIUID05_05 HHIUID06_05 HHIUID07_05 HHIUID08_05 HHIUID09_05 HHIUID10_05 HHIUID11_05 HHIUID12_05 HHIUID13_05 blank blank blank blank
HHIUID01_06 HHIUID02_06 HHIUID03_06 HHIUID04_06 HHIUID05_06 HHIUID06_06 HHIUID07_06 HHIUID08_06 HHIUID09_06 HHIUID10_06 HHIUID11_06 HHIUID12_06 HHIUID13_06 HHIUID14_06 blank blank blank
;

array hhage (10, 17)
HHI2AGE01_97 HHI2AGE02_97 HHI2AGE03_97 HHI2AGE04_97 HHI2AGE05_97
HHI2AGE06_97 HHI2AGE07_97 HHI2AGE08_97 HHI2AGE09_97 HHI2AGE10_97 HHI2AGE11_97 HHI2AGE12_97 HHI2AGE13_97 HHI2AGE14_97 HHI2AGE15_97 HHI2AGE16_97 HHI2AGE17_97
HHIAGE01_98 HHIAGE02_98 HHIAGE03_98 HHIAGE04_98 HHIAGE05_98 HHIAGE06_98 HHIAGE07_98 HHIAGE08_98 HHIAGE09_98 HHIAGE10_98 HHIAGE11_98 HHIAGE12_98 HHIAGE13_98 HHIAGE14_98 blank blank blank
HHIAGE01_99 HHIAGE02_99 HHIAGE03_99 HHIAGE04_99 HHIAGE05_99 HHIAGE06_99 HHIAGE07_99 HHIAGE08_99 HHIAGE09_99 HHIAGE10_99 HHIAGE11_99 HHIAGE12_99 HHIAGE13_99 HHIAGE14_99 blank blank blank
HHIAGE01_00 HHIAGE02_00 HHIAGE03_00 HHIAGE04_00 HHIAGE05_00 HHIAGE06_00 HHIAGE07_00 HHIAGE08_00 HHIAGE09_00 HHIAGE10_00 HHIAGE11_00 HHIAGE12_00 HHIAGE13_00 HHIAGE14_00 blank blank blank
HHIAGE01_01 HHIAGE02_01 HHIAGE03_01 HHIAGE04_01 HHIAGE05_01 HHIAGE06_01 HHIAGE07_01 HHIAGE08_01 HHIAGE09_01 HHIAGE10_01 HHIAGE11_01 HHIAGE12_01 HHIAGE13_01 HHIAGE14_01 HHIAGE15_01 HHIAGE16_01 blank
HHIAGE01_02 HHIAGE02_02 HHIAGE03_02 HHIAGE04_02 HHIAGE05_02 HHIAGE06_02 HHIAGE07_02 HHIAGE08_02 HHIAGE09_02 HHIAGE10_02 HHIAGE11_02 HHIAGE12_02 HHIAGE13_02 blank blank blank blank
HHIAGE01_03 HHIAGE02_03 HHIAGE03_03 HHIAGE04_03 HHIAGE05_03 HHIAGE06_03 HHIAGE07_03 HHIAGE08_03 HHIAGE09_03 HHIAGE10_03 HHIAGE11_03 HHIAGE12_03 HHIAGE13_03 blank blank blank blank
HHIAGE01_04 HHIAGE02_04 HHIAGE03_04 HHIAGE04_04 HHIAGE05_04 HHIAGE06_04 HHIAGE07_04 HHIAGE08_04 HHIAGE09_04 HHIAGE10_04 HHIAGE11_04 HHIAGE12_04 blank blank blank blank blank
HHIAGE01_05 HHIAGE02_05 HHIAGE03_05 HHIAGE04_05 HHIAGE05_05 HHIAGE06_05 HHIAGE07_05 HHIAGE08_05 HHIAGE09_05 HHIAGE10_05 HHIAGE11_05 HHIAGE12_05 HHIAGE13_05 HHIAGE14_05 HHIAGE15_05 HHIAGE16_05 HHIAGE17_05
HHIAGE01_06 HHIAGE02_06 HHIAGE03_06 HHIAGE04_06 HHIAGE05_06 HHIAGE06_06 HHIAGE07_06 HHIAGE08_06 HHIAGE09_06 HHIAGE10_06 HHIAGE11_06 HHIAGE12_06 HHIAGE13_06 HHIAGE14_06 blank blank blank
;

do k=1 to 10;
if k eq round then do;
do l=1 to 17;
if partuid gt 0 and partuid eq hhuid(k,l) and partage le 0 then do;
partage=hhage(k,l);
end;
end;
end;
end;