[EpiData-list] How to define Jumps at a variable using another variable

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Sun Aug 8 12:21:13 CDT 2010

You should do this with GOTO as Hans suggests:

  before entry
    if (a04 >=0 and a04 <=18) then
     goto a08

blocks that begin with a variable name cannot appear within the block for another variable. If you need to use the variable tempv elsewhere, then include this at the top of your check file

before file
  define tempv # global


On 2010-08-05, at 7:25 AM, epidata-list at lists.umanitoba.ca wrote:

> 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       
>     define tempv #
>      IF a04 RANGE 0 18 THEN tempv=1
>           ELSE tempv=2
>      ENDIF
>      tempv
>          JUMPS
>            2 a08
>          END 
>        END
>   END      

More information about the EpiData-list mailing list