Syntax, DATA step for
match-merging:
DATA output-SAS-data-set;
MERGE SAS-data-set-1
SAS-data-set-2;
BY <DESCENDING> variable(s);
RUN;
|
data merged; merge a b; by num; run;
proc sort data=clinic.demog; by id; run; proc print data=clinic.demog; run;
proc sort data=clinic.visit; by id; run; proc print data=clinic.visit; run;
data clinic.merged; merge clinic.demog clinic.visit; by id; run; proc print data=clinic.merged; run;
proc sort data=clinic.demog; by descending id; run; proc sort data=clinic.visit; by descending id; run; data clinic.merged; merge clinic.demog clinic.visit; by descending id; run; proc print data=clinic.merged; run;