code:
%LET iterations = 5;
%LET winner = Lance Armstrong;
DO i = 1 to &iterations;
TITLE "First: &winner";
log:
macro loops need macro syntax
%LET iterations = 5;
%LET winner = Lance Armstrong;DO i = 1 to &iterations;TITLE "First: &winner";
something like:
%macro a13;
%DO i = 1 %to &iterations;
TITLE "First: &winner";
%end;
%mend a13;
Your code doesn't ring the bell in what you want to accomplish
%LET iterations = 5;
%LET winner = Lance Armstrong;
DO i = 1 to &iterations; <- This DO belongs in a data step block of code. You may be thinking of a macro loop which would use %DO but still has a syntax error because you show no End or %end.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.