SASUnit Examples
Version 1.5.0
|
Checks whether a foreign key relationship between the columns of two data sets exists. More...
Go to the source code of this file.
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.
i_mstrLib | library of data set treated as master table |
i_mstMem | member name of data set treated as master table |
i_mstKey | key or keys of the master table. Multiple keys have to be separated by blank |
i_unique | optional: by default set to true |
i_lookupLib | library of data set treated as lookup table |
i_lookupMem | member name of data set treated as lookup table |
i_lookupKey | key or keys of the lookup table. Multiple keys have to be separated by blank |
i_cmpKeyLen | number of keys specified in i_mstKey and i_lookupKey |
o_maxObsRprtFail | optional: maximum number of records to be listed where lookup failed. By default set to MAX |
o_listingVars | additional variables from master dataset to be listed. Additional variables have to be separated by blanks |
o_treatMissings | optional: Handling of missing values in the master data set: Possible parameters are IGNORE, DISALLOW, VALUE(default) |
i_desc | a description of the test default: "Check for foreign key relation" |
Definition in file assertforeignkey.sas.