Hello Team,
I need support on the code below, it keeps returning "error."
My objective is to Use WORK.HEART2 as the input dataset, then create a library named HEARTLIB with an output dataset named HEARTLIB.MYHEART that contains only observations that have non-missing values for the variables below:
AgeAtStart | Height | Systolic |
BP_Status | MRW | Weight |
Chol_StatusNew | Sex_New | Weight_Status |
Cholesterol | Smoking | Weight_Status2 |
Diastolic | Smoking_StatusNew | |
libname heartlib "/home/u41093773/HeartLib";
data heartlib.myheart;
set heart2;
if nmiss(ageatstart, cholesterol, diastolic, Height, MRW, Smoking, Systolic,
Weight) = 0 and
cmiss(bp_status, chol_statusnew, smoking_statusnew, weight_statusnew) = 0 then output;
run;
proc freq data=heartlib.myheart;
tables _character_ / missing;
run;
proc means data=heartlib.myheart nmiss;
var _numeric_;
run;