I am stuck in identifying the way to send out email notification to users about any changes in one of our reference table.
My table goes like this
REF_CUST_DETAILS
CUST_ID | ACCOUNT_ID | CITY | CENTRE |
1 | 12 | Ahmedabad | Gujarat |
2 | 33 | Bangalore | Karnataka |
3 | 123 | Chennai | Tamilnadu |
4 | 232 | Delhi | Delhi |
5 | 7688 | Mumbai | MH |
6 | 890 | Nagpur | MH |
7 | 89 | Raipur | MP |
8 | 56 | Trivendrum | Kerala |
This is our static reference table so whenever there is any changes in format of columns (Like increasing length,changing data types etc) and any changes in observations (Addition,Deletion,Update of any columns ), we should get an email that the table was changed. I can think of having change tracking like SCD type2 or type1 but simply dont know how to implement that using SAS base coding..
Need your valuable suggestions on this
I'm not sure how to trigger it by a change, but you could run a SAS program periodically (nightly?) that uses PROC COMPARE to compare the PROC CONTENTS output from the table with a reference version of the contents and have the program logic decide on sending an e-mail.
And conditionally update the reference table.
I would likely create a "change table" with the dates of the changes as well in case a history of changes becomes important.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.