LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2004, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
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/


Back to: Top of message | Previous page | Main SAS-L page