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

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Thu Aug 5 13:18:21 CDT 2010


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 at 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
>
>
>
>
>    

-- 
Hans L Rieder, MD, MPH
Jetzikofenstr 12
3038 Kirchlindach
   Switzerland

Tel: +41 31 829 4577
Mob: +41 79 321 9122
Web: http://www.tbrieder.org




More information about the EpiData-list mailing list