09-11-2016 02:53 PM - edited 09-11-2016 02:53 PM
I'm working with a dataset that has a list of action items where each action item has the owner name. Note that some owner has more than one action item.
My goal is to take the list of action items, divide them up by each owner, and email that Excel sheet to each owner. I'm pretty new to SAS Macros and I'm having difficulty thinking of what's the best way to do it. Currently, I'm writing code specific to each owner:
Then I'm going to proc export for each owner dataset and have SAS email out that report, however, I don't want an email to be sent if there are no action items. Clearly this is taking a lot of time and I can't help but think there's a better way to do this. Any ideas to get me started?
09-11-2016 05:34 PM
Hard to say with just what you've posted here. It depends on how much difference there is between each 'action'.
It could be easy to say, create a macro for each action and then use call execute to loop through your list and execute the correct macro for each user.
Or a generic macro that takes the action for each user and somehow filters out the correct action so the action is a parameter to the macro.
09-11-2016 06:48 PM
There's no real difference between the actions. Either the "Description" column has some detail in it, or it's blank (blank meaning that there are no action items).
Do you have any basic macro literature I can look at? I've googled my situation and the macros that might be helpful are way too complex for me at this point.
09-11-2016 08:19 PM
Basic Intro here:
Then read through the examples:
The examples have most of what people should need for a starter.
Then search through lexjansen for any number of papers on the topic: