- data aaa;
- input x y;
- cards;
- 1 2
- 3 4
- ;
- run;
- data bbb;
- set aaa;
- where x>3;
- run;
- %macro checknobs(dsn);
- proc sql noprint;
- select nobs into:obscount from dictionary.tables
- where trim(libname)||"."||memname="%upcase(&dsn)";
- quit;
- %if &obscount >0 %then %do;
- proc print data=&dsn(obs=10);
- title1 "a few observations from &dsn";
- run;
- %end;
- %else %do;
- data _null_;
- file print notitles;
- put "there are no observations in &dsn";
- run;
- %end;
- %mend checknobs;
- %checknobs(work.bbb)


雷达卡



京公网安备 11010802022788号







