Date: Thu, 20 Mar 2008 11:57:20 -0500
Reply-To: "data _null_," <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_," <datanull@GMAIL.COM>
Subject: Re: Sort alphabetically
In-Reply-To: <47E290B1.7030305@inode.at>
Content-Type: text/plain; charset=ISO-8859-1
On Thu, Mar 20, 2008 at 11:28 AM, lil x <lilx@inode.at> wrote:
> Hi all,
>
> also FORMAT instead of RETAIN works. Is that true or is RETAIN
> recommended? What are the differences between the two statements used
> for sorting variable names?
This limited test seems to indicate that using FORMAT or RETAIN
produce the same result. I believe that using RETAIN is the more
accepted method, in that I have seen RETAIN used more often than
FORMAT for this purpose.
dm 'clear log; clear output;';
data test;
x = 1;
c = 'C';
a = 2;
format x z3. a 4.;
run;
proc contents varnum;
run;
data test2;
format a C x;
set test;
run;
proc contents varnum;
run;
data test3;
retain a C x;
set test;
run;
proc contents varnum;
run;
|