My OS is Linux and I made this to obtain the table with paths: data _null_; rc1=system("cd /data/projects/smartdata/librerie/"); rc2=system("du -k > /data/projects/smartdata/librerie/listfolders.txt"); run; PROC IMPORT OUT= WORK.listfolders DATAFILE= "/data/projects/smartdata/librerie/listfolders.txt" DBMS=DLM REPLACE; DELIMITER='09'x; GETNAMES=NO; DATAROW=1; RUN; And I have also this macro: %macro list_folder_contents(folder_path,file_path); *create library; libname lib_tmp "&folder_path."; *list library detailed contents; proc sql; create table List_lib_contents as select memname, memtype from dictionary.members where libname="LIB_TMP" and memtype in ('DATA','CATALOG'); quit; *count the number of rows; data _NULL_; if 0 then set work.List_lib_contents nobs=n; call symputx('nrows',n); stop; run; *verify for files; %if &nrows > 0 %then %do; libname oldlib "&folder_path."; filename tranfile "&file_path."; proc cport lib=oldlib file=tranfile; run; %end; %mend; Can I call this macro using perhaps like parameter the paths which are in the sas table obtained?
... View more