Hi, I have two questions regarding data cleaning:

Q1) I have a following wide data and want to convert into long type as follows:
id year quantity id0 year0 quantity0 id1 year1 quantity1
1 1985 100 1 1986 150 1 1987 50
2 1985 200 2 1986 400 2 1987 100
3 1985 300 3 1986 500 3 1987 180
...
...
id year quantity
1 1985 100
1 1986 150
1 1987 50
2 1985 200
2 1986 400
2 1987 100
3 1985 300
3 1986 500
3 1987 180

Tricky part for me is that variables are labelled var, var0, var1...var30, which making it difficult to use loops.
So in this case, I don't think simply the following code would not work:
Code:
reshape long quantity, i(id) j(year)
Should I rename each variable one by one so that it may look like var0, var1, var2,..., var31 before using reshape?
Or is there any better way to do the job?

Q2) If I have multiple (let's say 10) long type data files as above, is it possible to merge all of files with a single line of merge code? Or should I pair and merge them 10 times?

Sorry for bombarding the questions.

Thanks for your help.