![](https://secure.gravatar.com/avatar/f174b9816ccce31bf5cdb49501b15358.jpg?s=120&d=mm&r=g)
Unless, something go lost, there is surely something missing here:
IF N9SUICIDE = or (N9SUICIDE = 2 AND TOTAL >= 16) or TOTAL > 42
Hans
epidata-list@lists.umanitoba.ca wrote:
Hi,
I wonder if someone can spot the syntax problem in this CHK file for the Beck Depression inventory. I've struggled for hours to get it to work the way it did under Epi Info. Basically, there are three conditions in an IF statement. I've tried with the two simple conditions alone and the script works (condition at the beginning & at the end). Combining conditions always gives the 'atrisk' calculated variable the answer "N". Is there a limitation or syntax difference in Epidata??
AFTER RECORD TOTALPG1=SAD+N2DISCOURA+N3FAILURE+N4SATISFAC+N5GUILT+N6PUNISHED+N7DISAPPOI+N8SELFCRIT+N9SUICIDE+N10CRY+N11IRRITAT TOTALPG2=2INTPPL+N13DECISIO+N14LOOKWOR+N15CANWORK+N16SLEEP+N17TIRED+N18APPETIT+N19WEIGHT+N20WORRYHL+N21INTSEX TOTAL=TALPG1 + TOTALPG2 IF N9SUICIDE = or (N9SUICIDE = 2 AND TOTAL >= 16) or TOTAL > 42 THEN ATRISK=" ELSE ATRISK=" ENDIF END