This small example comes from a larger macro that processes various date input formats to various date output formats, including numeric and character sources. It can be called multiple times from within the same data step. It doesn't matter that the results from run 2 overwrite run 1 because once processed, results from run 1 are no longer necessary. In fact, both variables are cleared (call missing) each time but I have not included that in my example. I can remove the length statement but that would result in both variables being created as the same type (because of that same inheritance, e.g. both numeric if the first macro call uses a numeric variable) which would make the 2nd macro run go wrong if it uses a character input variable.
... View more