data test;
varlist = '_2014Q1,_2014Q2,_2014Q3,_2014Q4';
_2014Q1 =3;
_2014Q2 =.;
_2014Q3 =2;
_2014Q4 =.;
_2015Q1 =5;
_2015Q2 =.;
_2015Q3 =.;
_2015Q4 =.;
Array _tmp{*} _201: ;
call missing (Count_NotMiss, Max_Val);
do _i = 1 to dim(_tmp);
if _tmp(_i) ne . and index(varlist,vname(_tmp(_i))) > 0 then
do;
Count_NotMiss + 1;
Max_Val = Max(Max_Val,_tmp(_i));
end;
end;
Run;