I have the following simple macro %macro hospseq (DSN=,NDSN=); data new2019; set &DSN; run; %YEARSTEP(YEAR =2019 ); proc datasets library=work nolist; change cake2_2019=&NDSN; quit; run; proc export data=&NDSN outfile="s:\smm\excel\&ndsn" dbms=csv replace; run; %mend hospseq; When I run the macro using the parameters below it produces the output file MS2019_ALLcsv. What do I need to do to make the macro produce the CSV file with the CSV extension. So I get MS2019_all.CSV instead of MS2019_allcsv . If I manually rename the file from MS2019_allCSV to MS2019_All.CSV the file is in the proper format. Thanks for any suggestions. Larry %HOSPSEQ(DSN=smm2019,NDSN=MS2019_All);
... View more