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?
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.
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.
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:
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.