SASUnit Examples
Version 1.5.0
|
Check whether there are differences between the values of the columns of two sas data sets (PROC COMPARE). More...
Go to the source code of this file.
Check whether there are differences between the values of the columns of two sas data sets (PROC COMPARE).
The values of the two data sets are considered to match each other if all columns existing in data set i_expected are also existing in data set i_actual.
Optionally one can define a deviation for numerical values so that all corresponding values can be deviating from each other less than a maximal deviation of i_fuzz (Caution: this corresponds to the parameter 'criterion' of PROC COMPARE, the parameter 'fuzz' has a different meaning in the context of PROC COMPARE)
i_expected | data set with expected values |
i_actual | data set with actual values |
i_desc | description of the assertion to be checked default: "Compare datasets" |
i_fuzz | optional: maximal deviation of expected and actual values, only for numerical values |
i_allow | optional: accepted differences between data sets, default setting is DSLABEL LABEL COMPVAR DSLABEL Data set labels differ DSTYPE Data set types differ INFORMAT Variable has different informat FORMAT Variable has different format LENGTH Variable has different length LABEL Variable has different label BASEOBS Base data set has observation not in comparison COMPOBS Comparison data set has observation not in base BASEBY Base data set has BY group not in comparison COMPBY Comparison data set has BY group not in base BASEVAR Base data set has variable not in comparison COMPVAR Comparison data set has variable not in base VALUE A value comparison was unequal TYPE Conflicting variable types BYVAR BY variables do not match ERROR Fatal error: comparison not done |
i_id | optional: Id-column for matching of observations |
o_maxReportObs | optional: number of observations that are copied from the expected and actual data set. default setting is MAX |
i_include | optional: include list of variables to match |
i_exclude | optional: exclude list of variables to match |
Definition in file assertcolumns.sas.