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 (November 2008, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 17 Nov 2008 15:02:51 -0500
Reply-To:   Hari Nath <hari_s_nath@YAHOO.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Hari Nath <hari_s_nath@YAHOO.COM>
Subject:   Re: Any easier way to count these.

Thanks Dale and Akshaya for the array solution. Since i have several variables, array seems to be more efficient than just using sas functions.

On Mon, 17 Nov 2008 11:08:55 -0800, Akshaya <akshaya.nathilvar@GMAIL.COM> wrote:

>There's a Lost card, so include missover option, to make all record >read. > >Data have; > infile cards missover; > input (a1-a3) ($); > cnt=0; > array abc a1-a3; > do over abc; > if indexw(abc,'bnd') then cnt+1; > if indexw(abc,'bnid') then cnt+1; > end; >cards ; >bnd bnid bnsr >bnd bnd bnd >bnid bnd >; > >Thanks! >Akshaya


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