So you want to generate XX calls to NONMEM. You want store them into more than one batch files.
You could either specify the number of files you want and then calculate how many calls to write to each file.
Or specify the maximum number of calls to write to each file.
Let's do the latter.
%let num_runs=300;
%let max_runs_per_file=100;
data _null_;
length fname $256 testname $50 ;
do i=1 to &num_runs;
testname = cats('TEST',i,'.CTL');
modi = mod(i,&max_runs_per_file);
if 1=modi then batch+1;
fname = cats('/path/','boot',batch,'.bat');
file bat filevar=fname ;
if 1=mod1 then put 'REM ' batch= 'Starts with ' testname= ;
put 'CALL NMGO ' testname '-MAXLIM=3' ;
end;
run;
So this will create three files named boot1.bat, boot2,bat and boot3.bat in the directory /path/.
Each file will have a first line that is a comment that shows which file it is and which test/run number it starts with followed by up to 100 calls to NONMEM.
... View more