Data SETB;
Retain X Y Z W;
Set SETA;
Run;
SETB being the name of the new set that will contain the re-ordered variables, SETA being the set that requires the variables to be re-ordered.
Unlisted variables that existed in the prior set will still remain in the new set, even if not listed within the RETAIN statement, however, they will be listed at the very end of the set.
SAS Retain Statement: SAS University
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.