SAS: rearrange field order in data step

Posted by Dan on Stack Overflow See other posts from Stack Overflow or by Dan
Published on 2010-04-19T20:33:37Z Indexed on 2010/04/20 1:33 UTC
Read the original article Hit count: 449

Filed under:
|
|

In SAS 9, how can I in a simple data step, rearrange the order the field.

Data set2;
  /*Something probably goes here*/
  set set1;
run;

So if set1 has the following fields:

Name   Title   Salary
A      Chief   40000
B      Chief   45000

Then I can change the field order of set2 to:

Title  Salary  Name
Chief  40000   A
Chief  45000   B

Thanks,

Dan

© Stack Overflow or respective owner

Related posts about sas

Related posts about field