data b;
set a end=last;
if not last then set a(firstobs=2 keep=l u rename=(l=_l u=_u));
if missing(_l) and missing(_u) then call missing(gender);
drop _l _u;
run;
data b;
set a end=last;
if not last then set a(firstobs=2 keep=l u rename=(l=_l u=_u));
if missing(_l) and missing(_u) then call missing(gender);
drop _l _u;
run;