|
Macros for SAS Application Developers
https://github.com/sasjs/core |
Asserts the values in a column. More...
Go to the source code of this file.
Useful in the context of writing sasjs tests. The results of the test are appended to the &outds. table.
Example usage:
data work.checkds;
do checkval='Jane','James','Jill';
output;
end;
run;
%mp_assertcolvals(sashelp.class.name,
checkvals=work.checkds.checkval,
desc=At least one value has a match,
test=ANYVAL
)
data work.check;
do val='M','F';
output;
end;
run;
%mp_assertcolvals(sashelp.class.sex,
checkvals=work.check.val,
desc=All values have a match,
test=ALLVALS
)
| [in] | indscol | The input library.dataset.column to test for values | ||||||
| [in] | checkvals= | (0) A library.dataset.column value containing a UNIQUE list of values to be compared against the source (indscol). | ||||||
| [in] | desc= | (Testing observations) The user provided test description | ||||||
| [in] | test= | (ALLVALS) The test to apply. Valid values are:
| ||||||
| [out] | outds= | (work.test_results) The output dataset to contain the results. If it does not exist, it will be created, with the following format:
|
Definition in file mp_assertcolvals.sas.