What do these two statements Do WITHIN SAS macros? Can these statements be used outside of Macros? Again, is there a helpful site that breaks things down well? I'm still feeling really lost in the SAS pages online.
You have received poor guidance. Macro language is not something you should spend your time on, when you are a new SAS user. If you would like, I can give you a dozen topics that would be a better use of your time.
%DO is used to control MACRO logic within a defined macro (%macro name; .... %mend;). It can not be used in open code (out side of a macro).
DO is to control code in a datastep and certain computation blocks in procedures such as Proc Report.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.