Page 1 of 1

Error on Computing Age

Posted: November 10th, 2022, 8:49 am
by VirtuesArios
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;

Re: Error on Computing Age

Posted: November 10th, 2022, 1:14 pm
by sherrell
Could you send us your program (zipped), along with at least one case worth of data? Either post it here, or send it to us at cspro@lists.census.gov

FYI, tomorrow is a Federal holiday, so we will be off.

Thank you,
Sherrell