SASUnit Examples  Version 1.5.0
assertcolumns.sas File Reference

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.

Detailed Description

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)

Version
$Revision: 316 $
Author
$Author: akirchmann $
Date
$Date: 2014-03-02 10:20:58 +0100 (So, 02 Mrz 2014) $
See Also
For further details refer to SASUnit User's Guide. Here you can find the SASUnit documentation, release notes and license information.
$HeadURL: https://svn.code.sf.net/p/sasunit/code/trunk/saspgm/sasunit/assertcolumns.sas $
Parameters
i_expecteddata set with expected values
i_actualdata set with actual values
i_descdescription of the assertion to be checked
default: "Compare datasets"
i_fuzzoptional: maximal deviation of expected and actual values, only for numerical values
i_allowoptional: 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_idoptional: Id-column for matching of observations
o_maxReportObsoptional: number of observations that are copied from the expected and actual data set. default setting is MAX
i_includeoptional: include list of variables to match
i_excludeoptional: exclude list of variables to match
Returns
ODS-document containing a comparison report; moreover, if o_maxReportObs ne 0, the expected and the actual data set are written to _acLib

Definition in file assertcolumns.sas.