burndengreen
Programmer
I am reading an input file with in excess of 125,00 recs, (and increasing all the time). I want to break it down into SAS output tables with 15,000 recs on each with the remainder on the final file. I have to keep changing my code to accomodate the increasing number of files. Is there any way to write the first 15000 recs to a file called say
TESTIT1 the second file to TESTIT2 etc. with the names being allocated on the fly, i tried . I have tried using macros but SAS seems to process macros before other code so the names never change.
y + 1;
filnam = 'TESTIT';
thisfile = compress(trim(filnam)||trim);
call symput ('thisfil',thisfile);
I also executed the above code every time _N_ was divisible by 15000 and used
data work.&thisfil ;
as my output file definition but it wrote everything to TESTIT1.
This is driving me bonkers now any help greatly appreciated.
TESTIT1 the second file to TESTIT2 etc. with the names being allocated on the fly, i tried . I have tried using macros but SAS seems to process macros before other code so the names never change.
y + 1;
filnam = 'TESTIT';
thisfile = compress(trim(filnam)||trim);
call symput ('thisfil',thisfile);
I also executed the above code every time _N_ was divisible by 15000 and used
data work.&thisfil ;
as my output file definition but it wrote everything to TESTIT1.
This is driving me bonkers now any help greatly appreciated.