Dear all, I am working on macro facility and when I writes the codes, sometimes it is difficult for me to determine when to use a macro loop and when not to. Below is an example of my code: %macro test1b(type); data advance.test1b; set advance.test1a; %if &type=Orio %then %do; where test2='abc'; %end; run; %mend test1b; The function of the code is to first check whether user inputs the parameter 'Orio', and if it is true then executes the 'where' clause. I found that whether or not I add a % in the loop, the outputs are very similar except a variable named "Orio' is created when % is not used. I do not quite understand the difference in the use of %, and may someone please explain with respect to the above example? Thank you so much! Casey
... View more