Date: Fri, 30 Jan 2004 20:31:26 -0500
Reply-To: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Richard A. DeVenezia" <radevenz@IX.NETCOM.COM>
Subject: Re: help needed replacing variable attributes.
"davy" <no.spam@here.please> wrote in message
news:gfBSb.14071$JL4.116152@newsfep4-glfd.server.ntli.net...
> I have a dataset with well over two hundered variables.
>
> All of the variables are character.
>
> What I would like to do is to replace each instance where a variable
> attribute is a "T","N" or "_" with the letter "Y".
>
> Is there anyway i can do this with a global statement or something (rather
> than laboriously typing out 'if statements' for each variable).
>
> I would appreciate any help.
>
> Thanks for your time.
>
> Davy
>
>
You can use an array
array v _character_;
do i = 1 to dim(v);
if v(i) in ('T', 'N', '_') then v(i) = 'Y';
end;
--
Richard A. DeVenezia
http://www.devenezia.com/
|