Date: Thu, 6 Feb 1997 07:05:51 +0000
Reply-To: Roland Rashleigh-Berry <RolandRB@NETCOMUK.CO.UK>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Roland Rashleigh-Berry <RolandRB@NETCOMUK.CO.UK>
Organization: NETCOM Internet Ltd.
Subject: Re: Change internal order of var
Content-Type: text/plain; charset=us-ascii
You can change the order of variables using a length statement.
data dsn2;
length a b c d 8;
set dsn1;
run;
RRB
Jian-Zheng Zhou wrote:
>
> I remember there were some disscussions about the way to change the variable
> in a sas data file in this newsgroup before. It seems to me someone
> suggested to use retain statement in a data step to change variable order.i
> such as:
>
> data a;
> set a;
> retain var1 var2 ....;
> run;
>
> But I tried it several days ago. It did not work. I probably did not
> remember it correctly. Can someone tell me the correct way to change the
> order of variables in a sas data set?
>
> Thank you in advance.
>
> --
> Jian-Zheng Zhou
> Research Associate Tel: 301-405-1381(O)
> Department of Animal Sciences 301-590-0902(H)
> University of Maryland email:jz17@umail.umd.edu
> College Park, MD20742 coral@marlowe.umd.edu
|