If you have SAS version 9.2 or later , this link will work regardless of the OS:
http://support.sas.com/kb/38/267.html
Here is a paraphrased version of the link that answers your question exactly:
%let filename = d:\sasdev\autoexec.sas; data info; length filesize $60; drop rc fid close; rc=filename("myfile","&filename"); fid=fopen("myfile"); filesize=finfo(fid,"File Size (bytes)"); close=fclose(fid); put filesize=; run;
Cheers Rob
PS - Have you checked www.runsubmit.com ? This is like StackOverflow, but only for SAS related issues.
source share