Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
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, provide a libds value as follows:

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

Which gives:

‍2mb

Parameters
[in]fpath=Full path and filename. Provide this OR the libds value.
[in]libds=(0) Library.dataset value (assumes library is BASE engine)
[in]format=(NO) Set to yes to apply sizekmg. format
Returns
bytes
Version
9.2
Author
Allan Bowe

Definition in file mf_getfilesize.sas.