SASUnit Examples  Version 1.5.0
assertforeignkey.sas File Reference

Checks whether a foreign key relationship between the columns of two data sets exists. More...

Go to the source code of this file.

Detailed Description

Checks whether a foreign key relationship between the columns of two data sets exists.

This assert supports simple and composite keys. The number of specified columns in parameters i_mstKey and i_lookupKey must be the same and columns have to be in the same order. If more than one column is specified the parameter i_cmpKeyLen has to be provided containing the number of columns. Eventually needed renaming of key variables takes place automatically.

Version
$Revision: 316 $
Author
$Author: akirchmann $
Date
$Date: 2014-03-02 10:20:58 +0100 (So, 02 Mrz 2014) $
See Also
For further information please 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/assertforeignkey.sas $
Parameters
i_mstrLiblibrary of data set treated as master table
i_mstMemmember name of data set treated as master table
i_mstKeykey or keys of the master table. Multiple keys have to be separated by blank
i_uniqueoptional: by default set to true
i_lookupLiblibrary of data set treated as lookup table
i_lookupMemmember name of data set treated as lookup table
i_lookupKeykey or keys of the lookup table. Multiple keys have to be separated by blank
i_cmpKeyLennumber of keys specified in i_mstKey and i_lookupKey
o_maxObsRprtFailoptional: maximum number of records to be listed where lookup failed. By default set to MAX
o_listingVarsadditional variables from master dataset to be listed. Additional variables have to be separated by blanks
o_treatMissingsoptional: Handling of missing values in the master data set: Possible parameters are IGNORE, DISALLOW, VALUE(default)
i_desca description of the test
default: "Check for foreign key relation"

Definition in file assertforeignkey.sas.