[EpiData-list] IF... THEN LEGAL

epidata-list at lists.umanitoba.ca epidata-list at lists.umanitoba.ca
Tue Aug 30 16:08:55 CDT 2011


Hi all,

I'm trying to combine IF... THEN with LEGAL but somehow I'm having problems
with it. Basically, what I want to do is to determine valid values for one
variable based on the answer given to another variable. In the example
below, the two vars are stateid and countyid: If stateid = 1 then countyid
could be 01 or 04; if stateid = 2 then countyid could be 02, 03 or 05.

Example:

countyid
  IF stateid = 1 THEN
    LEGAL
      01
      04
  END
  ENDIF
  IF stateid = 2 THEN
    LEGAL
      02
      03
      05
  END
  ENDIF
  MUSTENTER
END
-- 
Thomaz A.


More information about the EpiData-list mailing list