Hi,
I'm a beginner so please be kind! I need some help with the SAS code below, I am using two variables called calvingdate and dob to create a new variable called afc. However, I still need calvingdate to remain in my dataset (it disappears when I run the code below). Is there any command that will allow me to keep calvingdate while still creating the new variable afc? 🙂
proc sort data=together2;
by techid;
run;
data together2;
merge together2 (in=a) first_weight (in=b);
by techid;
if a and b;
run;
data together2;
set together2;
afc=calvingdate-dob;
run;
Thanks in advance!:)
... View more