Dear all,

I am working with a dataset that contains some 75 variables I and would like to change the order of these variables.
I know I could do this manually for each variable to be moved with
Code:
 order mo02student, after(mo01student)
A loop, however, would save me a lot of time.

The dataset I am working with looks like this:
ID mo01student mo01work mo01unemployed mo02student mo02work mo02unemployed
12345 1 0 0 1 0 0
12346 0 0 1 0 1 0
Each variable describes a certain activity of an individual in month 1, 2, ..., 72. Right now, these variables are ordered by months, but I would prefer to order it by activity.
So, I would want it to look like this:
ID mo01student mo02student mo01work mo02work mo01unemployed mo02unemployed
12345 1 1 0 0 0 0
12346 0 0 0 1 1 0

Any help or thoughts on how the loop should look like would be much appreciated.

Best,
Ricka Baehnsch