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 (June 2007, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 20 Jun 2007 15:46:46 -0400
Reply-To:     Ya Huang <ya.huang@AMYLIN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ya Huang <ya.huang@AMYLIN.COM>
Subject:      Re: data manipulation
Comments: To: Jack Clark <JClark@CHPDM.UMBC.EDU>

Jack,

Of course! I was under the assumption (from the sample given) that no missing account and no 'distinct' account counting is needed :-)

On Wed, 20 Jun 2007 15:31:51 -0400, Jack Clark <JClark@CHPDM.UMBC.EDU> wrote:

>Ya, > >Wouldn't your code count total observations in the dataset, where the >SQL COUNT() function will count the number of non-missing observations >for the variable? If there is missing data, this could lead to >different numbers. > >Jack Clark >Research Analyst >Center for Health Program Development and Management >University of Maryland, Baltimore County > > >-----Original Message----- >From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Ya >Huang >Sent: Wednesday, June 20, 2007 3:20 PM >To: SAS-L@LISTSERV.UGA.EDU >Subject: Re: data manipulation > >No need to do any data manipulation, the information you need >is already in the meta data: > >data want; > set sashelp.vtable (where=(libname='WORK' and memname ^='WANT')); >keep memname nobs; >run; > >proc print; >run; > >memname nobs > > ABC 4 > XYZ 7 > > >On Wed, 20 Jun 2007 14:54:19 -0400, mesecca L katram <mesecca@YAHOO.COM> >wrote: > >>data abc; >>input loans month; >>datalines; >>1000 1 >>1001 3 >>1004 4 >>1007 3 >>; >>run; >>data xyz; >>input loan year; >>datalines; >>2004 1 >>2005 3 >>2006 4 >>2007 3 >>2001 3 >>2004 4 >>2008 3 >>; >>run; >>PROC SQL ; >>SELECT COUNT(loans) INTO :x FROM abc ; >>SELECT COUNT(loan) INTO :y FROM xyz; >>QUIT; >> >>data loan; >>Number_of_loans_in_abc=&x; >>Number_of_loans_in_xyz=&y; >>run; >> >>I need to report number of loans on each data set if I run the above >data >>step.I report then in >>the following >>Number_of_loans_in_abc Number_of_loans_in_xyz >>4 7 >> >>but I want the data set >> >>Numberofloans >>abc 4 >>xyz 7 >> >>is it possible?


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