I agree with @ballardw that knowing where you ultimately want to go woudl help in finding you the best solution.
In the meantime, if you do this:
data TEST;
input Ref Date:yymmdd10. Cycle side$ value;
datalines;
024301 2017-04-03 1 A 39.969
024301 2017-04-03 1 B 40.645
024301 2017-04-03 1000 A 44.353
024301 2017-04-03 1000 B 44.788
024301 2017-04-03 10000 A 52.774
024301 2017-04-03 10000 B 47.719
024301 2017-04-03 30000 A 53.998
024301 2017-04-03 30000 B 51.878
;
run;
proc sql;
create table populated as
select c.ref, c.date, c.cycle, c.side, c.value as myval, d.value as fixval
from test c inner join test d
on c.ref = d.ref and c.date = d.date and c.side = d.side
where d.cycle = 1;
quit;
You get this:
The SAS System
Ref Date Cycle side myval fixval
24301 20912 1 A 39.969 39.969
24301 20912 1 B 40.645 40.645
24301 20912 1000 A 44.353 39.969
24301 20912 1000 B 44.788 40.645
24301 20912 10000 A 52.774 39.969
24301 20912 10000 B 47.719 40.645
24301 20912 30000 A 53.998 39.969
24301 20912 30000 B 51.878 40.645
But as noted, that may not really be the way you want to go.
... View more