Hello,
As per my understanding of the query, you are trying to join two tables with similar month values using outer join. Your intended result can be achieved if you set MergeKeys to true in outer join function. If you replace the line which calls outer join function with the following it would resolve the problem.
outerjoin(a2,b2,"Keys","Var1","MergeKeys",true);
For more detailed explanation about the outer join function following link can be useful.
Hope it resolves your problem