assertcolumns.sas File Reference


Detailed Description

Check whether there are differences between the values of the columns of two sas data sets (PROC COMPARE).

Please refer to the description of the test tools in _sasunit_doc.sas

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 and if all coresponding values are 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: 9 $
Author:
$Author: amangold $
Date:
$Date: 2010-08-02 22:33:56 +0200 (Mo, 02 Aug 2010) $
See also:
$HeadURL: https://sasunit.svn.sourceforge.net/svnroot/sasunit/trunk/saspgm/sasunit/assertcolumns.sas $
Parameters:
i_expected data set with expected values
i_actual data set with actual values
i_desc description of the assertion to be checked
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
Returns:
ODS-document containing a comparison report; moreover, if o_maxReportObs ne 0, the expected and the actual data set are written to testout

Definition in file assertcolumns.sas.

Go to the source code of this file.


Generated on Sun Oct 10 14:10:15 2010 for SASUnit Examples by  doxygen 1.5.3