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.
Nearly 200 sessions are now available on demand in the Innovate Hub.
Watch Now →Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.