%macro xportallfiles; options mprint symbolgen nofmterr ; %let filrf=mydir; %let rc=%sysfunc(filename(filrf,"E:\sas\TABLES PRACTICE\")); %let did=%sysfunc(dopen(&filrf)); %let fname=; %let memcount=%sysfunc(dnum(&did)); %if &memcount > 0 %then %do i=1 %to &memcount; %let fname=%sysfunc(dread(&did,&i)); %let iw=%index(&fname,.); /* find start of extension */ %let exts=%substr(&fname,&iw); /* find file extension */ libname xx xport "E:\sas\TABLES PRACTICE\&fname."; proc copy in=xx out=work ; run; %end; %let rc=%sysfunc(dclose(&did)); %mend xportallfiles; %xportallfiles; if i use this code i will get xpt files from where we will give location
... View more