Date: Wed, 2 Jan 2008 13:29:46 -0800
Reply-To: Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Hamilton <jfh@STANFORDALUMNI.ORG>
Subject: Re: Change of format
In-Reply-To: <7367b4e20801021317y666d6a9dw990a4b3e8a8d818e@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"
You could also use the ALTER statement in PROC SQL.
On Wed, 2 Jan 2008 15:17:52 -0600, "data _null_," <datanull@GMAIL.COM>
said:
> Create a macro variable to hold the desired order of variables and use
> it in RETAIN as if to "reorder". Then use length or attrib before
> set.
>
> proc sql noprint;
> select name into :OrderList separated by ' '
> from dictionary.columns
> where libname eq 'SASHELP' and memname eq 'CLASS'
> order by varnum
> ;
> quit;
> run;
> %put &orderlist;
>
> data work.class;
> retain &orderList;
> length sex $2;
> length name $10;
> set sashelp.class;
> run;
> proc contents varnum;
> run;
>
> On Jan 2, 2008 2:47 PM, <saslearn007@gmail.com> wrote:
> >
> > On Jan 2, 3:28 pm, saslearn...@gmail.com wrote:
> > > How can I change the format of one variable in many variables with out
> > > disturbing the order of variables.
> > >
> > > Thanks
> > Sorry my question was about the length of variable.
> >
> > Thanks
> >
--
Jack Hamilton
Sacramento, California
jfh@alumni.stanford.org
|