%macro filesize(data=&syslast,debug=0)/stmt; %if &debug=0 %then options nonotes nomprint; %else options notes mprint;; %let data=%upcase(&data); %exist(&data); %if &exist=yes %then %do; %let dsname=%scan(&data,2); %if &dsname= %then %do; %let libname=WORK; %let dsname=&data; %end; %else %do; %let libname=%scan(&data,1); %let dsname=%scan(&data,2); %end; proc sql noprint; select nobs into: nobs from dictionary.tables where libname="&libname" & memname="&dsname"; select obslen into: obslen from dictionary.tables where libname="&libname" & memname="&dsname"; quit; options notes nomprint; %global filesize; %let filesize=%eval(&nobs*&obslen); %let filesize=%eval((&filesize/1000)*1015); %put NOTE: File &data size is approx. &filesize bytes (uncompressed).; %put %str( ); %end; %mend filesize;