Hi Leonid,

I've been looking for something like this but I'm wondering how can I amend your code for my needs.

Basically, I have a .json file with 6.7million records. Currently it is too large to use the sas json mapper, therefore I need to split it out.

filename json3 '\\C\Rec_20190402\total_json.json';
filename out1 '\\C\Rec_20190402\paye_1.json';
filename out2 '\\C\Rec_20190402\paye_1.json';
filename out3 '\\C\Rec_20190402\paye_1.json';

data _null_;
infile json3;
if _n_ ge 500000 then output out1;
****and so on
put _infile_;
run;

Basically I would like to ouput the large files into smaller ones based on when _N_ is a value.

I'm having trouble trying to get working code though and would appreciate some advice.