data killList;
set have;
by id;
retain onlyZeros;
if first.id then onlyZeros = 1;
if var = '1' then onlyZeros = 0;
if last.id and onlyZeros then output;
keep id;
run;
data want;
merge have killList(in= removeIt);
by id;
if removeIt then delete;
run;
SAS Innovate 2025: Save the Date
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!