Order, Order! Four Ways to Reorder Your Variables, Ranked by Elegance and Efficiency

Louise Hadden
Abt Associates Inc.


Abstract

SASĀ® practitioners are frequently required to present variables in an output data file in a particular order, or standards may require variables in a production data file to be in a particular order. This paper and presentation offer several methods for reordering variables in a data file, encompassing both DATA step and procedural methods. Relative efficiency and elegance of the solutions will be discussed.