While IF and WHERE are largely interchangeable from a syntax view point, some operators or functions can only be used in one of them.
WHERE can use operators such as like, contains, sounds like, or between as they come from the SQL world where WHERE clauses are used.
IF can use functions such as lag or vvalue or attrn as these belong firmly to the SAS world only.
... View more