Hi, In SAS, any numeric value other than 0 or missing is true, and a value of 0 or missing is false. Therefore, a numeric variable or expression can stand alone in a condition. If its value is a number other than 0 or missing, the condition is true; if its value is 0 or missing, the condition is false. 0 = False . = False 1 = True As a result, you need to be careful when using the OR operator with a series of comparisons. Remember that only one comparison in a series of OR comparisons must be true to make a condition true, and any nonzero, nonmissing constant is always evaluated as true. Therefore, the following subsetting IF statement is always true: if B =2 or 3; SAS first evaluates B = 2, and the result can be either true or false. However, because the 3 is evaluated as nonzero and nonmissing (true), the entire expression is true. In the following statement, however, the condition is not necessarily true because either comparison can evaluate as true or false: if B=2 or B=3; -Urvish
... View more