The output will show you the SAS macro variables generated, if any, by your PROC SQL execution.
And if you are trying to iterate through the variable list, please share all of the related macro code you are executing, preferably in a SAS log perspective, with any errors. This info will help with providing feedback.
When I use %put _user_;
It does list all the variables in the log. But, It does not resolve when i use %put &&name&i.
My later part of the code looks like this and it does not resolve there too.
855 %do i=1 %to &totobs;
ERROR: The %DO statement is not valid in open code.
857 %if %sysfunc(fileexist("C:\DandS\Mydoc\RawData\&&name&i..dat")) = 1
ERROR: The %IF statement is not valid in open code.
858 %then %do;
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
NOTE: The SAS System stopped processing this step because of errors.