Date: Fri, 18 Nov 2005 22:03:23 -0500
Reply-To: Arthur Tabachneck <art297@NETSCAPE.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Arthur Tabachneck <art297@NETSCAPE.NET>
Subject: Re: Array
Presuming what Richie is looking for is related to the problem he posed last
week, he is probably looking for something similar to:
data c (drop=var3 var4 var5 counter);
retain var1 var2;
retain var1 var2 var3_1 var4_1 var5_1
var3_2 var4_2 var5_2
var3_3 var4_3 var5_3;
array v1{3} $ var3_1 var3_2 var3_3;
array v2{6} var4_1 var5_1 var4_2 var5_2 var4_3 var5_3;
do _n_=0 by 1 until(last.counter);
set b;
by counter;
if _n_ <= 2 then do;
v1{1+_n_} = var3;
v2{1+2*_n_} = var4;
v2{2+2*_n_} = var5;
end;
end;
run;
Art
---------------
"Richie" <gsingh24@gmail.com> wrote in message
news:1132363610.667145.231840@g44g2000cwa.googlegroups.com...
> I am trying to load an array on three variables out of which one is
> character and two are numeric. i converted the numeric variables into
> character. But when I am trying to run the array code. The two
> character variables (the same ones that were numeric before) get loaded
> and the third one doesn't get loaded? How do work it out?