how to display a sentence in the SAS result output window

Viewed 6784

I wrote a macro using sas. I saved the log in an external txt file, using the following code.

proc printto log="path\log.txt"; run;

%macro loop(num);

  for i = 1 : #
    data a;
    set a;
    display &i;
    run;       
%mend;

% loop(100)

proc printto;  run;

My program works like a loop. for i = 1 : 100, do something then i = i +1. I want to display i at the end of each loop, so I know where the program is. I do not want it displayed in log /(the log txt file) because it will be mixed with the log and hard to read. so I can not use put "&i" function.

Please let me know if there is any better place to display i (maybe the result output window?) If so, how to do it please.

2 Answers
Related