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
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.
&job_id is a macro variable that you haven't defined. To more fully answer your questions, you need to provide a complete example of what you are trying to do and the answers you are looking for. I did answer your question of how to include all rows of T1, but your response indicates that is not the problem you were trying to solve.