1- I also don't understand why the printed value in the log shows such a large number of blank spaces, many more than 8, for the resolved reference as put to the log?
The default format used when not specified is best12. which results in a length of 12. It's a poor format to use really, but that's what we get by default. Not too sure why a length of 8 is mentioned.
You can see it by using
data T;
call symput('a',1);
run;
%put &=a*;
which results in
A= 1* 123456789012
Length is 12 as you can see.
2- Now that SYMPUTX exists, there is no reason to use SYMPUT.
3- The code above generates
NOTE: Numeric values have been converted to character values at the places given by:
Do not tolerate these messages in the LOG.
If you accept them for valid data, you will miss when they highlight invalid data and this will bite you hard.
Your LOG must be squeaky clean (as much as possible, SAS can make this hard to achieve)
4- I note printing the macro var in a TITLE statement WILL strip the leading blanks
Some reporting formats, such as HTML, do not show multiple spaces. If you go see the HTML source, all the spaces are here, but they are compressed for display.
... View more