Add a tag field to both Datasets. In Dataset1 name the field TAG1 and populate this new field with the values "DataSet1" . In Dataset2 name the field TAG2 and populalate this new field with the values "DataSet2".
When you merge the two Datasets together, you will then know which ID are common or not to both DataSets.
Any solutions I provide on this forum are free of charge, donations go towards the maintenance of the unaffiliated SPSS forum.