I am trying to split a big data file into several subsets. The subsets only have two repeated observations. Why my code does not work? How come the two duplicated records on each subsets? Thank you for being so helpful! options mlogic ; options MPRINT; options SYMBOLGEN; data tt; do i=1 to 1e7; KEY = int(ranuni(0)*1e5); output; end; run; %macro split_1(N=3, data=tt); %do i=1 %to &N; data or_sub&i; IF i < &N THEN do; %let a = %eval(10000*&i); %let b = %eval(10000+10000*&i); set tt(FirstObs=&a obs=&b ); end; run; %put ERROR: &i; %end; %mend split_1; %split_1(N=3, data=Tt)
... View more