Date: Fri, 15 Sep 2006 11:04:33 -0400
Reply-To: Muthia Kachirayan <muthia.kachirayan@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Muthia Kachirayan <muthia.kachirayan@GMAIL.COM>
Subject: Re: SAS array with FORMAT statement
In-Reply-To: <200609151442.k8FAkffV025894@mailgw.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Liz,
Try put t[i] 5.2;
or
x = put(t[i],5.2); output;
Muthia Kachirayan
On 9/15/06, Liz L. <saslizy@yahoo.com> wrote:
>
> I have a bunch of variables need to be formated. So I used an array with
> FORMAT statement. But it did not work. Please help me have a look at it.
> TIA!!!
>
> data test;
> a= 1.23568;
> b= 4.12345;
> c=46.123456;
> run;
>
> data test1;
> set test;
> array t{*} a b c;
> do i=1 to dim(t);
> format t{i} 5.2; /* Not working, why??? */
> end;
> run;
>
|