SAS: use macro to loop through a list of strings and read in & process files -


i have list of string contains 10 file names. each file, need read in , genearate table , plots , save results pdf files (i used ods pdf) want automate process, sas can read first element, generate results , save them pdf, goes next file name , read in... can me that? thanks!

part of code:

%macro print; %do i=1 %to 10;   proc import out= configtable datafile= "/sas/data/table.xlsx"      dbms=xlsx replace;      getnames=yes; run;  proc import out= dfw datafile= "/sas/data/%scan(&arr, &i, %str(,)).xlsx"      dbms=xlsx replace;      getnames=yes; run;    proc sql;        create table dfwflow      (select *, ......)  order .....; quit;   %end; %mend; %print; 

but doesn't work.....


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -