Error on Computing Age

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
VirtuesArios
Posts: 32
Joined: June 2nd, 2022, 5:55 am

Error on Computing Age

Post 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;
Attachments
Error on CSPro.jpg
Error on CSPro.jpg (83.54 KiB) Viewed 3190 times
sherrell
Posts: 397
Joined: April 2nd, 2014, 9:16 pm
Location: Washington, DC

Re: Error on Computing Age

Post 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
Post Reply