Hi , I have tried the code but not able to achieve the result. your assumption was correct I export the report to one drive . The drive will have a template for the reports and I use the attached macro to do the export of the report. Its not 56 reports that is report number , all the report will be having a report number. Now my client need to send one copy of the report to another folder with out the date string. I have tried with X command and the cold you have provided and was not able to get it. I attaching the export report macro It will be a %let rptpath= path;
%let rptname='56 rptname';
%let rptdate=today();
%let rptdatefmt = YYMMDDd10.;
%macro exportreport(path=, name=, date=, format=, data=);
data _NULL_;
src=&path || &name || '.xlsx';
src2 = &path || &name || '.xls';
dest = &path || &name || ' ' || put(&date, &format) || '.xlsx';
dest2 = &path || &name || ' ' || put(&date, &format) || '.xls';
if (fileexist(src)) then
do;
call system('copy ' || quote(src) || ' ' || quote(dest));
call symput('_exportreportpathname', dest);
end;
else if (fileexist(src2)) then
do;
call system('copy ' || quote(src2) || ' ' || quote(dest2));
call symput('_exportreportpathname', dest2);
end;
run;
%exportfile(pathname=&_exportreportpathname., data=&data);
%mend exportreport;
%exportreport(path=&rptpath, name=&rptname, date=&rptdate, format=&rptdatefmt, data=FINAL_OUT);
great help if I can get a similar macro to sent export the report with out date string to another folder.thanks>manesh
... View more