[code:64191]data b;
set a;
by id;
retain sbp1-sbp3;
array sbp[3];
if first.id then i=1;
sbp[i]=sbps;
i+1;
if last.id then output;
drop sbps time i;
run;[/code:64191]
[code:f30f6]data b;
retain id;
array u[*] sbp1-sbp3;
do i=1 to dim(u);
set a ;
u[i]=sbps;
end;
drop sbps time i;
run;[/code:f30f6]
data a; input
code1 code2;
datalines;
1 2
1 3
1 4
; run;
data b; input
code1 ret;
datalines;
1 0.5
1 0.6
1 0.7
;
run;
proc sql;
create table result as
select * from a, b;
quit;
This works but I got a warning in the log:
WARNING: Variable code1 already exists on file WORK.RESULT.
Anybody knows why? I am not quite familar with proc sql.