Features: |
Macro facility DATASETS procedure PRINT procedure |
Data sets: | PROCLIB.DELAY and |
libname printlib 'SAS-data-library'; libname proclib 'SAS-data-library'; options nodate pageno=1;
proc datasets library=proclib memtype=data nolist; copy out=printlib; select delay internat; run;
%macro printall(libname,worklib=work);
%local num i;
proc datasets library=&libname memtype=data nodetails; contents out=&worklib..temp1(keep=memname) data=_all_ noprint; run;
data _null_; set &worklib..temp1 end=final; by memname notsorted; if last.memname; n+1; call symput('ds'||left(put(n,8.)),trim(memname));
if final then call symput('num',put(n,8.));
run;
%do i=1 %to # proc print data=&libname..&&ds&i noobs; title "Data Set &libname..&&ds&i"; run; %end; %mend printall;
options nodate pageno=1 linesize=70 pagesize=60; %printall(printlib)
proc datasets library=&libname memtype=data nodetails; contents out=&worklib..temp1(keep=memname) data=_all_ noprint; run;
data _null_; set &worklib..temp1 end=final; by memname notsorted; if last.memname; n+1; call symput('ds'||left(put(n,8.)),trim(memname));
%do i=1 %to # proc print data=&libname..&&ds&i noobs; title "Data Set &libname..&&ds&i"; run; %end; %mend printall;