In reply to marcello.

Thank you, Marcello, for your very useful feedback. I ran the following test:

%macro test;
%do i=1 %to 20000;
data _DATA_;
x=&i;
run;
%end;
%mend test;
%test;

and found that indeed data sets have been created from DATA1 ... DATA9999, then numbering resets to 1 and the process continues thus overwriting the previously created data sets.
To get to the bottom of it I opened a ticket with SAS Technical Support, and will let you know of any new information regarding this matter.
Thank you again for reporting this unexpected and undocumented behavior.