LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 1996, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 18 Jul 1996 09:57:54 -0500
Reply-To:     Paul Rutz <prutz@TCADA.STATE.TX.US>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Paul Rutz <prutz@TCADA.STATE.TX.US>
Subject:      Re: Q: How to rearrange variables?
Comments: To: Dmitry Mesyanzhinov <dmes@EC26.ENRG.LSU.EDU>
In-Reply-To:  <31EBDDA4.4B94@ec26.enrg.lsu.edu>

I've used the following to get my PROC FREQ variables in alphabetical order. I suspect the same would work in MEANS.

/* Create a temp dataset containing the variable names */ proc contents data=scrn.ssmast2 out=temp; run;

/* Sort the temp dataset by variable name */ proc sort; by name; run;

/* Write sorted variable names to a text file */ data _null_; set; file "temp.tmp"; put name; run;

/* Read the text file back in */ proc freq data=scrn.ssmast2; table %include "temp.tmp";; run;

Paul Rutz --------------------------------------------------------------

On Tue, 16 Jul 1996, Dmitry Mesyanzhinov wrote:

> Dear SAS users, > > When I run proc means or contents on my dataset, > variables appear in the order in which they were created. > There are about 300 variables in the dataset, > and it would be more convinient if the listing is > done in, say, alphabetical order. I tried to specify > the desired sequence of variables in the KEEP option, > but that didn't work. > Is there a way to rearrange the variables in a dataset? > > Thanks in advance. >


Back to: Top of message | Previous page | Main SAS-L page