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.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.