Hi everyone, I am on SAS OnDemand for Academics trying to create a SAS macro that is able to merge html files (that all have the same variables) into a single dataset for downstream analysis. The process of building the macro seems to be fine (?), but when I try to run it (the "usage" step), a couple of error messages pop up, the main one being that there is "insufficient authorization to access PIPE". No merged SAS dataset is created either. Can anybody direct me to where I might have went wrong? %macro merge_html_files(path=C:\1 - Main\1 - University\4 - Research\XMLExports, outdata=XMLComb);
filename dirlist pipe "ls &path/*.html";
data html_files;
infile dirlist truncover;
input filename $100.;
output;
run;
data &outdata;
set html_files;
do i = 1 to _n_;
%let file = %sysfunc(scan(&filename, i, ' '));
proc import datafile="&file"
out=html_data&i
dbms=html replace;
run;
if i = 1 then set html_data&i;
else set &outdata html_data&i;
end;
run;
%mend merge_html_files;
/* Usage */
%merge_html_files(path=C:\1 - Main\1 - University\4 - Research\XMLExports, outdata=XMLComb); Thank you!!!
... View more