Patrick give a better code.Thanks Patrick!
Since you did not post output you need, so it is hard to code exactly.
You want append only one record after every three records in A?
[pre]
data A;
do i = 1 to 10;
c=5*i;
output;
end;
run;
data B;
c=25;i=66;output;
c=75;i=99;output;
run;
data want;
set a;
output;
if mod(_n_,3)=0 then do;
count+1;
if count le _nobs then do;
set b point=count nobs=_nobs;
output;
end;
end;
run;
proc print;run;
[/pre]
Ksharp
Message was edited by: Ksharp
... View more