I wanted to write the program in one pass where the data is read once for all variable and observations and not many times to complete the job belowDtaonce for :
%do i=1 %to &no_var;
proc sql;
create table var&i as
select &&name&i from a;
quit;
%end;
%do i=1 %to &no_var;
proc sql noprint;
create table miss&i as
select count(*)/&no_obs as mlsing
from var&i
where &&name&i=.;
quit;
%end;
%do i=1 %to &no_var;
proc sql noprint;
create table zero&i as
select count(*)/&no_obs as zlrou
from var&i
where &&name&i=0;
quit;
%end;