Not perfect if source and QC programmers make the same mistake, but you should be able to sleep at night.
Are you using Pinnacle 21 Community Validator ? it is the easiest way to check consistency between domains and it also checks domains against controlled terminology.
There is really no such thing as a tool or program that will perfectly validate or check your data. However there are techniques in SAS that can help you like this:
proc freq data = sashelp.class;
table _numeric_;
run;
This program will count discrete levels of all numeric variables in the chosen dataset. Obviously this is only useful for non-continuous numerics but it gives you an idea as to how you can approach validation.
Edit: An example of how to check for missing or zero values:
data test;
set sashelp.class;
output;
if name in ('Carol','Thomas') then do;
age = 0; height = . ; weight = 0;
output;
end;
run;
data test;
drop i;
set test;
array nums (*) _numeric_ ;
do i = 1 to dim(nums);
if nums(i) in (.) then Missing_Flag = 'Y';
if nums(i) in (0) then Zero_Flag = 'Y';
end;
run;
proc freq data = test;
where Missing_Flag = 'Y' or Zero_Flag = 'Y';
table name * _numeric_ / missing list;
run;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.