Pretty much any time you are doing a conversion from numeric to text, which is what the macro language is, text, you need to consider how SAS does that. If you don't explicitly control the conversion, such as with PUT and a format and possibly an alignment indicator, you get a generic routing that uses a BEST12. format, resulting in leading spaces if your value uses fewer digits.
I can't come close to remembering how many times I may have used trim(left(<somevariable>)) when building macro variables. Before Call SymputX was added to the statements.
... View more