haven't seen your data but you should do this check anyway:
![tarheel13_0-1669485957708.png tarheel13_0-1669485957708.png](https://communities.sas.com/t5/image/serverpage/image-id/77732iB4018232F329B0E2/image-size/medium?v=v2&px=400)
data bmi;
set prac.chol_new;
if nmiss(ht,wt)=0 then do;
bmi=703*(wt/(ht**2));
end;
if nmiss(age,bmi)=0 then do;
if age le 65 then do;
if bmi < 18 or bmi > 25 then age_bmicat=1;
else age_bmicat=2;
end;
else do;
if bmi < 25 or bmi > 30 then age_bmicat=3;
else age_bmicat=4;
end;
end;
run;
proc means data=bmi n nmiss min max;
class age_bmicat / missing;
var age bmi;
run;
Note, it is important to only create the new categorical variable when age and BMI are both nonmissing.