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" <firstname.lastname@example.org> wrote in message
> 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.
You can use an array
array v _character_;
do i = 1 to dim(v);
if v(i) in ('T', 'N', '_') then v(i) = 'Y';
Richard A. DeVenezia