I don't think using an old version of SAS will impact this program. Most likely your issue is that you are running on different data and so the program runs wrong. Make the program more flexible so that it adapts to the data that is available.
Instead of hard coding the upperbound let SAS count for you. This program should work fine with SAS9.2 (or even older).
%macro txt(libref,outdir=P:\sourcing\SAS_check);
%local i;
proc sql noprint ;
select memname into :b1 - :b999999
from dictionary.tables
where libname = %upcase("&libref")
;
quit;
%do i=1 %to &sqlobs;
proc export data=&libref..&&b&i dbms=tab
outfile="&outdir\&&b&i...txt" replace
;
run;
%end;
%mend txt;
libname OUTPUT 'P:\sample\SAS_check';
%txt(output);
... View more