To use a MERGE with a BY statement, the observations are joined on matching values of CD. Since you have none, the example data would have 8 observations. Your "if in1 and in2;" statement is what causes the output dataset to have 0 observations.
To include all rows of T1, change the IF statement to
IF in1;
In this example, your output dataset, e1, would be the same as t1.
To understand this behavior, get rid of the DROP and subsetting IF, and add a KEEP statement for in1 and in2 and then look at the output.
This paper will help
http://support.sas.com/techsup/technote/ts705.pdf
(I just searched support.sas.com for "merge examples".)
Doc Muhlbaier
Duke