I go into SAS Enterprise Guide, open up this SAS code file and scroll down to the %LET MONYR = SEP21 and %LET MONFLG = SEPTEMBER-2021 lines and manually update them to whatever month I need. I then save the code and hit Run. I then save the output files as .csv files because they are incredibly large. I ultimately need the output to be .csv so that I can save them on a shared drive for the analysts to use to do their research.
@Reese00 wrote:
I go into SAS Enterprise Guide, open up this SAS code file and scroll down to the %LET MONYR = SEP21 and %LET MONFLG = SEPTEMBER-2021 lines and manually update them to whatever month I need. I then save the code and hit Run. I then save the output files as .csv files because they are incredibly large. I ultimately need the output to be .csv so that I can save them on a shared drive for the analysts to use to do their research.
You need to know more about how the actual program works to see if you can do what you want.
You could search for how those two macro variables are used by the program. At least one is probably used to subset the data (or pick which dataset to use). To see whether you can change the program to use a full year of data instead of just a month will require understanding how the program works.
Depending on what the current process is producing you might be able to get what you want by using your current method 12 times to get runs for each of the months in your interval to produce 12 separate CSV files. You could then combine the 12 files into one. But whether those combined numbers will make any sense depends a lot on what type of analysis you are doing.
@Tom - Yes, in this instance it's the same file regardless of the year. The file is just a list of EMPIDs that we want to pull this data for (there are about 220 IDs in the list) .
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.