There is difference between how SAS handles IF and WHERE conditions. The 'WHERE' condition is applied on data before they enter Program Data Vector (PDV) and in case of 'IF' it is applied after data comes out from PDV. Now, if you have created a variable in the same data step using Where : the created variable will not be applied condition. IF: the created variable will be subjected to the condition applied
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!