A few things to think about ...
Did you mean to read in your variables as character variables instead of numeric? That's the impact of adding $ to the INPUT statement.
There is nothing in your DATA step that prints the results.
Adding ELSE to the logic is probably the wrong thing to do. If A has a missing value, you should not skip over B. You still need to inspect whether B has a missing value.
The syntax you use to check for missing values looks like this:
missing(A)
That won't compute. You could use this instead:
A = " "
If you switch and read the variables as numeric, you would check for a missing value using:
A = .
So in context you might end up with:
if A = . then MissA + 1;