You could use ODS CSV with the BYGROUP and NEWFILE options but it doesn't name the files by the BY group value, it names them with Report1.csv report2.csv etc.
ods csvall file='C:\_localdata\demo.csv' newfile=bygroup;
*make sure only data goes to report;
title;footnote;*no title/footnotes;
ods noptitle;*supress proc title;
options nobyline; *no by lines to indicate by group;
proc print data=class noobs;
by sex;
run;
ods csvall close;
To get the full names you likely need a small macro or you could do it in a data step with CALL EXECUTE or DOSUBL but it can be harder to understand those at first.
I would suggest writing a program to get it working for one month and then following the steps here to create a macro instead.
https://github.com/statgeek/SAS-Tutorials/blob/master/Turning%20a%20program%20into%20a%20macro.md
I used CALL EXECUTE but you could loop the macro through your list of dates as well. If you can make the base program and run into issues, post back your code with details of what is not working and we can help you fix it. Or someone else may just post an answer.
@taylor_sf wrote:
I am needing to provide the SAS data to an external vendor as monthly csv file through a secured website. It should be a one time occurrence.
The monthly datasets would range anywhere from 300k to 500k records each.
... View more