Hi
I have a functioning macro that creates a list of datasets from a master file that is unique for each day. The datasets I create in the SAS macro therefore have the data added to them so they are easy to categorize.
I would like to export some of the datasets as I create during the macro as csv files, as this will make analysis in R easier. I have written a Proc Export for each file I would like to export inside the macro itself, however even with the REPLACE function taken out, only the last file of the macro's run is saved to the file destination.
I use the below code for each dataset I would like to export while the macro is running.
Whould I write the proc export statements as individual macros instead?
Thanks
I have a functioning macro that creates a list of datasets from a master file that is unique for each day. The datasets I create in the SAS macro therefore have the data added to them so they are easy to categorize.
I would like to export some of the datasets as I create during the macro as csv files, as this will make analysis in R easier. I have written a Proc Export for each file I would like to export inside the macro itself, however even with the REPLACE function taken out, only the last file of the macro's run is saved to the file destination.
I use the below code for each dataset I would like to export while the macro is running.
Whould I write the proc export statements as individual macros instead?
Code:
PROC EXPORT DATA= dataset&year&mon2&day2
OUTFILE= "D:\Data"
DBMS=CSV LABEL;
PUTNAMES=YES;
RUN;