I have been given a program that macros a proc compare so that we can automate that step across numerous datasets. However, for some of the datasets, First Obs is not = 1. See example output below; note that there are 74,901 records but First Obs = 74,902 and Last Obs = 149,802. Since the macro is meant to handle any dataset, it does not use an ID statement. I found that if I did a separate proc compare, using ID variables, I get First Obs = 1 and Last Obs = 74,901. Can someone explain why this is? Obviously something is being handled differently within the proc compare when using ID variables vs. not using them, but I'm curious why it seems to double the number of observations, then compares the 2nd half. Dataset Created Modified NVar NObs Label LIB1_LOC.LB 06APR15:11:54:44 06APR15:14:22:31 43 74901 Laboratory Tests Results LIB2_LOC.LB 06APR15:11:54:44 06APR15:14:22:31 43 74901 Laboratory Tests Results Variables Summary Number of Variables in Common: 43. Observation Summary Observation Base Compare First Obs 74902 74902 Last Obs 149802 149802 Number of Observations in Common: 74901. Total Number of Observations Read from LIB1_LOC.LB: 74901. Total Number of Observations Read from LIB2_LOC.LB: 74901. Number of Observations with Some Compared Variables Unequal: 0. Number of Observations with All Compared Variables Equal: 74901. NOTE: No unequal values were found. All values compared are exactly equal.
... View more