You need to debug your SAS code. You need to dump the data values and see EXACTLY what the different variable values are. SAS doesn't mess up basic arithmetic, so if it is not triggering on an IF statement, then the condition is not being met -- and it becomes YOUR responsibility to figure out why, hence the data dump suggestion.
If all you are going to do is cry that your code is correct and the computer must be wrong, please find a new profession -- now. Programmers have come to me hundreds of times over the years claiming the computer made a mistake. The times that the eventual cause was discovered NOT to be programmer error I can count on one hand with fingers left over. Accept that your code is wrong, somewhere, and find it, fix it, then move on.
Suggestion: if you are not using OPTIONS MLOGIC MPRINT; in your SAS program, add them and run again. SAS has a lot of options to help debugging; if you are not familiar with them go to http://www.sas.com
and look under support at their knowledge base.