1.
data _null_;
set sahelp.class end=a;
if a;
call symput('obs',strip(put(_n_,best.)));
run;
%put &obs.;
2.
data _null_;
call symputx("nrows",attrn(open("sashelp.class"),"nobs"));
run;
%put &nrows.;
3.
data _null_;
if 0 then set final nobs=k;
call symputx("n",k);
stop;
run;