Error on Computing Age
Posted: November 10th, 2022, 8:49 am
Just like to ask if anybody had this kind of error, i've attached the error message on this post, thanks in advance for answering.
Code: Select all
preproc
// automatically compute age
numeric intcm = cmcode(INTM1, INTY1);
numeric birthcm = cmcode(B8M, B8Y);
numeric age_in_months = intcm - birthcm;
numeric age_in_years = int(age_in_months / 12);
//check if birthdate
[color=#FF0000]if age_in_months < 0 then
reenter B8Y (curocc());
endif; [/color]
$ = age_in_years;
postproc
if $ <> age_in_years then
reenter;
endif;