Be careful with your macro parameter names. If you use a name for a macro parameter that is also used as the name of a global macro variable, you implicitly create a local (to the macro) macro variable that takes precedence over the global one. When you then call the macro without explicitly supplying parameters, those local macrovars stay empty.
For the sake of less typing, I would use shorter names for macro parameters, and maybe prefix them with the macro name.
eg
%macro validate(validate_date_a, validate_date_b);
As it is, your macro with the given values would do nothing, as VariableToStoreLastDateTbleB (20160831) is smaller than VariableToStoreLastDateTbleA (20160930)
... View more