
Bola, there might be several problems here:
1) best make the conditional statement right after the data have been entered into the field: a4 AFTER ENTRY IF .... THEN .... ENDIF END END
2) "THEN" must be the last word on the line, what is to happen gets into the next line
3) I don't think a RANGE works within a conditional statement, bu this is also not necessary here, simpler is: IF a4<18 THEN GOTO X ENDIF
4) I don't think you can define a new variable in a field, this should be done outside a field, like in a BEFORE FILE statement:
BEFORE FILE DEFINE tempv # END
5) Not essential, but perhaps also try GOTO instead of jumps
There might be some other issues as well, but difficult to judge from the small excerpt.
Hans
On 20:59, epidata-list@lists.umanitoba.ca wrote:
Hi all,
Please help me on how I can define this jumps.
Variable a04 is exact age of respondent while variable a06 is another question. Variable a06 is only applicable to respondents whose age range is 0-18 otherwise a jump is required to variable a08. This is what I have done below but I keep getting error message.
Kindly help on how I can achieve the jumps.
Thank you.
Bola Adedoyin (Mrs) DC Pro-Data Consult Lagos, Nigeria
a06 BEFORE ENTRY define tempv # IF a04 RANGE 0 18 THEN tempv= ELSE tempv=2 ENDIF tempv JUMPS 2 a08 END END END END