So far we were able to generate 4 files for our 2017 data using the code I described and no issues with my machine. Yes, it's a mix of char , date and numeric but no pattern.
You are splitting your dataset be columns rather than by rows, possibly because your number of columns is know, but the number of rows is not always known. If so, you can run this:
data step FILE1 FILE2 FILE3 FILE4;
set MASTERFILE nobs=nrecs;
if _n_<= nrecs/4 then output file1; else
if _n_ <=nrecs/2 then output file2; else
if _n_ <= 3*nrecs/4 then output file3;
else output file4;
run;
Regardless of the dataset size, this outputs the first 25% to file1, the 2nd 25% to file2, etc.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.