Matching Cohabitating Partners to Their Characteristics in the NLSY97

1st partner from non-resident roster (Step 7)

array nruid (23)
NONHHIUID_01-NONHHIUID_23;

array nrage (23)
NONHHIAGE_01-NONHHIAGE_23;

if partuid gt 200 and partuid lt 300 then do;
do l=1 to 23;
if partuid eq nruid(l) and partage le 0 then do;
partage=nrage(l);
end;
end;
end;