dataset - How does SAS match columns in a set statement -


when this:

data test;    set temp1 temp2; run; 

does match temp1 , temp2 column names or column positions?

my guess column names, cannot find confirmation.

what happens if there column exists in temp1 , not in temp2?

by name. columns not on both tables exist on output tables missing values rows coming source table don't exist. super easy test.

data d1;     input var1 $ var2 $ var3;     datalines; e j 1 e k 2 e l 3 ; run;  data d2;     input var2 $ var1 $ var5;     datalines; e j 1 e k 2 e l 3 ; run;  data d3;     set d1 d2; run;  proc print data=d3; run; 

result:

obs var1 var2 var3 var5   1   e    j     1    .   2   e    k     2    .   3   e    l     3    .   4   j    e     .    1   5   k    e     .    2   6   l    e     .    3  

sas throw errors or warnings if there variable type conflicts.


Comments