I am seeking to use the code in this usage note
http://support.sas.com/kb/40/934.html
but applied to a file that resides within a Sharepoint document library. I took a stab at putting in the http address, like this
/** Non-macro technique **/
filename fileref 'http://sites/philtest/Shared%20Documents/runs.xlsx';
data a(drop=fid);
infile fileref truncover obs=1;
fid=fopen('fileref');
Bytes=finfo(fid,'File Size (bytes)');
crdate=finfo(fid,'Create Time');
moddate=finfo(fid,'Last Modified');
run;
proc print;
run;
But I get the error
ERROR: A component of C:\sas\sasconfig\Lev1\SASApp\http:\\sites\philtest\Shared%20Documents\runs.xlsx is not
a directory.
I would welcome any hints on how to adjust my code to get this to work. Thanks!
I am using SAS 9.04 TS1M6 EG 7.1
And if you get the device type working, this macro may give you some code ideas, even if you don't use the macro itself:
https://github.com/scottbass/SAS/blob/master/Macro/dirlist.sas
I'm still unable to get it to work -- same error -- despite using URL. My best guess at this point is that AUTHODOMAIN= might be needed to get me through to the site (which is an on-prem SharePoint document library). Still working on it.
Yes, Active Directory probably demands proper authentication.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.