|
Macros for SAS Application Developers
https://github.com/sasjs/core |
Iterative row-level MD5 hash generator. More...
Go to the source code of this file.
Generates DATA step statements that compute a deterministic, row-level MD5 hash using a Merkle-style construction. Each variable is hashed independently and the resulting raw 16-byte digests are combined iteratively. This avoids concatenating the per-variable hex digests into a single SAS character expression, which overflows when datasets contain many variables.
Temporary variables use five leading underscores.
This macro is called from inside a DATA step. The caller is responsible for declaring the output hash column if it does not already exist on the input dataset.
Variables are hashed in the order supplied. If a particular variable needs to influence the hash first (for example the previous row hash in mp_hashdataset, or business dates in Data Controller's bitemporal loader) simply list it first in cvars or nvars.
| [in] | md5_col= | Name of the output hash column. |
| [in] | cvars= | Space separated list of character variables to hash. |
| [in] | nvars= | Space separated list of numeric variables to hash. |
Definition in file mp_rowhash.sas.