BookmarkSubscribeRSS Feed
Reese00
Calcite | Level 5

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.

Tom
Super User Tom
Super User

@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.

Reeza
Super User
But you're reading a file called: FY22 EMPID Samples.csv

If you're pulling for 2021 is it the same file? There's some things in here that are kind of suspect from a production reporting standpoint for sure.
Reese00
Calcite | Level 5

@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) .

SAS Innovate 2025: Call for Content

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!

Submit your idea!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 18 replies
  • 1704 views
  • 2 likes
  • 6 in conversation