compute compda18=compdt18.
compute compda19=compdt19.
compute compda20=compdt20.
compute compda21=compdt21.
compute compda22=compdt22.
compute compda23=compdt23.
compute compda24=compdt24.
compute compda25=compdt25.
compute compda26=compdt26.
compute compda27=compdt27.
compute compda28=compdt28.
compute compda29=compdt29.
compute compda30=compdt30.
compute compda31=compdt31.
compute compda32=compdt32.
compute compda33=compdt33.
compute compda34=compdt34.
compute compda35=compdt35.
compute compda36=compdt36.
compute compda37=compdt37.
compute compda38=compdt38.
compute compda39=compdt39.
compute compda40=compdt40.
compute newtotby=0.
format newtotby(f1.0).
loop #i=1 to 40.
if(xprega(#i) ne 0)newtotby=newtotby+1.
end loop.
end if.
Variable labels missdany "Warning indicator for birthdates still not picked up".
Value labels missdany
0 "None missed"
1 "At least one missed".
fre missdany.
compute babydscp=0.
If(totbaby ne newtotby)babydscp=1.
* temporary.
* select if (changed=1 or changed=2).
* fre babydscp.
* temporary.
* select if (babydscp=1 and (changed=1 or changed=2)).
* fre bserial nserial.
fre pre91flg.
temporary.
select if (pre91flg=1).
fre nserial.
execute.
* re-declare missing values which were 'undeclared' at the start.
missing values prega prega2 prega3 prega4 prega5 prega6 prega7 prega8 prega9 prega10