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 (April 2007, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 25 Apr 2007 14:52:11 -0500
Reply-To:     Jane <program.sas@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jane <program.sas@GMAIL.COM>
Subject:      Re: Data step question
Comments: To: "data _null_," <datanull@gmail.com>
In-Reply-To:  <7367b4e20704251243p7a7a17f6t1dbc6547a2472b9@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Thanks, the problem was solved. :-)

On 4/25/07, data _null_; <datanull@gmail.com> wrote: > > Consider the expression used to compute FLAG. How you use is your choice. > > data; > infile cards missover; > input pid (var1-var5)(:$3.); > flag = not missing(coalesceC(of var:)); > cards; > 111 aaa bbb > 222 . ccc . ddd > 333 > 444 aaa > 555 . . eee > 666 > ;;;; > run; > proc print; > run; > > On 4/25/07, Jane <program.sas@gmail.com> wrote: > > Hi, All > > > > I have a dataset with the structure like this: > > > > pid var1 var2 var3 var4 var5 > > --------------------------------------- > > 111 aaa bbb > > 222 ccc ddd > > 333 > > 444 aaa > > 555 eee > > 666 > > > > I want to pick up the subjects with any of var1-var5 have value. Like > this > > > > pid > > ---- > > 111 > > 222 > > 444 > > 555 > > > > How can I do this in some simple way, since I actually have 20 var. If I > use > > if... then... that is really a lot work to do. > > Thanks > > > > Jane > > >


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