Good morning everyone.
I need to merge two datasets but the do file doesn't work. The structure is this:

use dataset2
sort countryname year
save dataset2, replace
use maindataset
sort countryname year
merge countryname year using dataset2 --------------------> at this point appears this message: (you are using old merge syntax; see [D] merge for new syntax); variable _merge already defined r(110); and the Do-File end

drop if _merge==2
save maindataset, replace


Someone could explain me why?