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 15:43:24 -0400
Reply-To:     "data _null_;" <datanull@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "data _null_;" <datanull@GMAIL.COM>
Subject:      Re: Data step question
Comments: To: Jane <program.sas@gmail.com>
In-Reply-To:  <200704251920.l3PFUTo6015090@mailgw.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

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