I've recreated a small sample of your sample here:
data diseases;
infile datalines dlm=' ' dsd;
input year age $ gender $ disease :$50. cases pop;
datalines;
1990 0-17 All Asthma 182000 64177000
1990 0-17 All "Dementia and Alzheimer's disease" . 64177000
1990 0-17 Female Asthma 71000 31295000
1990 0-17 Female "Dementia and Alzheimer's disease" 22000 31295000
1990 0-17 Male Asthma 111000 32883000
1990 0-17 Male "Dementia and Alzheimer's disease" . 32883000
run;
So if you do have a scenario as you mentioned, the easiest way to validate your data is to transpose it and then check that all = sum of females and males, as below. If it isn't, then make it so.
proc sort data=diseases;
by year age disease;
run;
proc transpose data=diseases out=diseases_t;
by year age disease;
var cases pop;
id gender;
run;
data diseases_validated;
set diseases_t;
valid = (all=sum(female,male));
run;
... View more