Is there a way to recover the original non-merge-matched observations without any additional variables?
For example, suppose that I am trying to obtain three separate data sets using the following codes:
data July31_11
July31_10
July31_01;
Merge one (in=ones) two (in=twos);
by id sex age state;
if ones=1 and twos=1 then output July31_11;
if ones=1 and twos=0 then output July31_10;
if ones=0 and twos=1 then output July31_01;
run;
My problem is that although the July31_10 and July31_01 give me the non-merge-matched cases (cases whether one of the data set did not contribute to the current observation because of missing values or other reasons), these will contain anyway the same total number of variables as the July31_11 data set will have.
I am interested in obtain (“recover”) the non-contributing cases in their original form (as they was in their respective original data set) with the original set of variables.
Do you have any suggestion?
Thanks