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=cert.demog; by id; run; proc print data=cert.demog; run;
proc sort data=cert.visit; by id; run; proc print data=cert.visit; run;
data work.merged; merge cert.demog cert.visit; by id; run; proc print data=work.merged; run;
proc sort data=cert.demog; by descending id; run; proc sort data=cert.visit; by descending id; run; data work.merged; merge cert.demog cert.visit; by descending id; run; proc print data=work.merged; run;