In reply to Rick Wicklin.

Yep, but that's not the issue.

%macro loop;
%do i=1 %to 120000;+1%end;
%mend;
data _null_;
A=%loop;
put A=;
run;

takes 0.3 seconds.

SAS struggles recursing more than a few times.