Date: Wed, 13 Feb 2008 13:21:37 -0800
Reply-To: Xuhong <zhuxuhong2000@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Xuhong <zhuxuhong2000@GMAIL.COM>
Organization: http://groups.google.com
Subject: Please help with my coding problem!
Content-Type: text/plain; charset=ISO-8859-1
Dear folks,
Please help me resolve the coding problems as showed below.
(I simplify my coding problems into a example as showed below. The
problem here is the final results only show the default 8 digits. I
also couldn't use "input" since the dataset I am using is already in
SAS format and the dataset has more than 100 character variables and
thousands of observations.
So, please help me to resolve the variable length problem at the array
part! Thanks very much!
proc format;
value $name
"A"="assistant professor"
"B"="associate professor"
"C"="stuff";
run;
data test;
input first $ second $ third $;
datalines;
A B C
B B A
C A B
;
data try (drop=i);
set test;
array a(*) _character_;
do i = 1 to dim(a);
a[i]=put(a[i], $name.);
end;
run;
|