Hi Suzanne, Tha code simply renames your variables into site1_1 (the first variable from your first dataset, in the order you listed in varnames: %let varnames=age height weight;), site1_2 ( the second variable from your first dataset),... site1_n, site2_1, etc. I assumed that you want to do a difference between the two tables (diff&i. = sum (site1_&i, -site2_&i);) which was the reason I renamed the variables in the first place. If that's the case, to use that code do the following: 1) in %let varnames=age height weight; replace age, height, weight with your variables from the two datasets. 2) name your datasets site1 and site2 (or change their name when you call the macro xxx). 3) replace by name with by (your list of unique identifiers). I hope this helps.
... View more