Merging three files, building panel data and regression

I'm not a complete newbie in Stata, but I think I'm probably newbie by the standards of the forum, I think.

The thing is, I'm trying to build a panel data and test a difference-in-differences model with fixed effects, but I'm having trouble with the merging of the files that I have. I have three files for three specific years and those files have the same variables for those three different years.

What I think I should do is identify those variables in terms of years and then merge the files. But I do not know how to do this command-wise in Stata. :shakehead

Would you guys be kind enough to give me some help?

Plus, if I have some missing inputs for those variables in some years, how do I deal with this in Stata?