First, you can't move a variable in a data set without making a new copy. Here's one way to make that copy, taking advantage of the sas data step compiler:
data want;
merge have (keep=ID Name DOB ) have (keep=status) have; /*corrected typo */
run;
The SAS compiler will arrange variables in the order they are revealed in the code. So:
- First merge have has ID NAME DOB (but ordered in whatever relative positions they have in the original).
- Second merge have gets STATUS, placed to the right of the above.
- Third merge have gets all the remaining variables, in their original order, placed to the right of STATUS.