/* 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.
*/
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.