Production Ready Macros for SAS Application Developers
mf_getfilesize.sas File Reference

Returns the size of a file in bytes. More...

Go to the source code of this file.

Detailed Description

Provide full path/filename.extension to the file, eg:

%put %mf_getfilesize(fpath=C:\temp\myfile.txt);

or

data x;do x=1 to 100000;y=x;output;end;run;
%put %mf_getfilesize(libds=work.x,format=yes);

gives:

2mb
Parameters
fpath=full path and filename. Provide this OR the libds value.
libds=library.dataset value (assumes library is BASE engine)
format=set to yes to apply sizekmg. format
Returns
bytes
Version
9.2
Author
Allan Bowe

Definition in file mf_getfilesize.sas.