Hi, we have a list in an Excel spreadsheet of email addresses that production reports go out to each day. The spreadsheet is read each day and the resulting email addresses are used to distribute reports. But...the problem is that we often have people that leave the company and we are not aware of them leaving and so the report gets sent to an orphaned email address. Is there a simple way of having the program go out each morning and poll the corporate email server and give us a list of the email addresses that are no longer in our system? Not sure if I am giving enough information but it's a start I guess.
Thanks much for any advice as to whether this is even possible.
Dave
To add to what @Reeza wrote:
A lot of sites synchronize users in SAS Metadata with LDAP/AD. A sample script for such synchronization comes as part of any SAS installation (importad.sas) and you could use this script as a starting point for your own code.
http://support.sas.com/kb/40/628.html
Should you only send emails to users which are already defined in SAS Metadata then there is also SAS macro %MDUEXTR readily available which pulls such information from SAS Metadata. Just try and execute %MDUEXTR (LIBREF=WORK);
And last but not least:
It might also be worth to check if such email addresses aren't already available in some EDW table. Employee information is sensitive so you might have to ask around internally to find out if such email information could be made accessible to you.
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.