Dear all,

I have two dataset, namely "A "and "B".

In "A" dataset I have identified a list of identifiers (around 6000) which I want to analyze in the "B" dataset.

How can I filter the "B" dataset, by for example creating an indicator, if they belong to the sample in "A" dataset?

Many thanks for your help. Below an example of the identifying variable in "A" dataset

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input str12 isin
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA0M6V00"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AEDFXA1EN018"
"AGP8696W1045"
"AGP8696W1045"
"AGP8696W1045"
"AGP8696W1045"
"AGP8696W1045"
"AGP8696W1045"
"AGP8696W1045"
"AGP8696W1045"
"AGP8696W1045"
"AGP8696W1045"
"AGP8696W1045"
"AGP8696W1045"
"AGP8696W1045"
"AGP8696W1045"
"AGP8696W1045"
"AGP8696W1045"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
"AN8068571086"
end