|
Macros for SAS Application Developers
https://github.com/sasjs/core |
Generates a stage dataset to revert diffs tracked in an audit table. More...
Go to the source code of this file.
A big benefit of tracking data changes in an audit table is that those changes can be subsequently reverted if necessary!
This macro prepares a staging dataset containing those differences - eg for:
_____DELETE__THIS__RECORD_____="YES"These changes are NOT applied to the base table - a staging dataset is simply prepared for an ETL process to action. In Data Controller, this dataset is used directly as an input to the APPROVE process (so that the reversion diffs can be reviewed prior to being applied).
| [in] | libds | Base library.dataset (will not be modified). The library must be assigned. |
| [in] | loadref | Unique identifier for the version to be reverted. This change, plus ALL SUBSEQUENT CHANGES, will be reverted in the output table. |
| [in] | difftable | The dataset containing the diffs. Definition available in mddl_dc_difftable.sas |
| [in] | filtervar= | (0) If provided, the contents of this macro variable will be applied as an additional filter against &libds |
| [out] | outds= | (work.mp_stripdiffs) Output table containing the diffs. Has the same format as the base datset, plus a _____DELETE__THIS__RECORD_____ variable. |
| [in] | mdebug= | set to 1 to enable DEBUG messages and preserve outputs |
Definition in file mp_stripdiffs.sas.