Trying to add a functionalty of writing 0 Count if there are no observations. However it fails on the second else if statement and runs if the else if is commented away....
Proc freq data=reason ; table remove /out=total_rød_w missing nocol nocum norow nosparse ;
;
run;
Proc datasets nolist;
contents DATA=work.total_rød_w out=temp(Keep=NOBS) noprint;
run;
Data check;
Set temp total_rød_w;
If NOBS = 0 Then do;
CALL SYMPUT ('Count',PUT(0,10.0));
else if NOBS = 1 Then do;
CALL SYMPUT ('Count',PUT(Count,10.0));
end;
Run;
... View more