Hi Mirisage. You are correct, the green highlighted place should be “Wiiii_okk_Total",that was a typo. For the IF/THEN-IF vs. IF/THEN - ELSE IF/THEN: ... if type = "a" and wii > 0 then do this; if type = "b" and wii < 0 then do this; VS. if type = "a" and wii > 0 then do this; else if type = "b" and wii < 0 then do this; I think that this (may) be the reason things work or not: The first scenario (no else-if) tells SAS that if this condition is true, then do this. after that, independent of the previous statement being true or not, check this new condition (we use the second if statement). OK, for the second scenario: we tell SAS if this statement is true then do something or other. ELSE IF do something....this forces SAS to only check this new IF statement if the prior IF (the one above) is not true. SO... if type = "a" and wii > 0 then do this; * may or may not be true; if type = "b" and wii < 0 then do this;* may or may not be true...However, SAS executes both; VS. if type = "a" and wii > 0 then do this; * may or may not be true; else if type = "b" and wii < 0 then do this;*this will only get executed when the line above is FALSE. The end. Good luck!
... View more