In reply to Sean.

Hi Sean, I see several places where your code went wrong. First, you are missing INPUT statement that reads a record; second, you use OUTPUT statement which is used for datasets, for files you need to use FILE statement. Your output files are defined identically. You also don't provide your IF-THEN logic ("****and so on" is not enough). The devil is in details. Here is how I would arrange your code:

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

data _null_;
infile json3;
input;
if _n_ le 500000 then file out1; else
if _n_ le 1000000 then file out2; else file out3;
put _infile_;
run;

Adjust it as needed. Please let me know if it solves your problem.