/* a counter example */
data a;
id=1; output;
run;
data b;
id=1; y=0; output;
run;
data c;
merge a(in=x) b(in=y);
by id;
if x and y;
run;
data d;
merge a(in=x) b;
by id;
if x;
run;
proc compare base=c compare=d;
run;
/* on log -- in part
WARNING: No matching observations were found.
NOTE: There were 0 observations read from the data set WORK.C.
NOTE: There were 1 observations read from the data set WORK.D.
*/
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.