BookmarkSubscribeRSS Feed
Abiodun
Calcite | Level 5

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;

1 REPLY 1
Kurt_Bremser
Super User

Whenever you have WARNINGs or ERRORs, or other issues with your code, post the complete log (all code and all messages) by copy/pasting it into a window opened with this button:

Bildschirmfoto 2020-04-07 um 08.32.59.jpg