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 2004, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 9 Jun 2004 04:00:21 -0700
Reply-To:   Easwara Moorthy <easwar_ps@YAHOO.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Easwara Moorthy <easwar_ps@YAHOO.COM>
Organization:   http://groups.google.com
Subject:   Retreiving record Counts through Macro ATTRN
Content-Type:   text/plain; charset=ISO-8859-1

Hi all,

I've a specific requirement which follows:

data one;/*sample dataset i created for testing*/ a=1;output;a=1;output;a=1;output;a=2;output;a=1;output;a=2;output; run;

I want the record count of a=1 as another variable in another dataset.

%macro get; %let dsid = %sysfunc(open(one)); %if &dsid %then %do; %let rc=%sysfunc(where(&dsid,'a=1')); %let nobs =%sysfunc(attrn(&dsid,NLOBSF)); %let rc = %sysfunc(close(&dsid)); &nobs %end; %mend;

data two; anothervariable=%get; run;

I'm gettin error that 'ERROR: The WHERE function referenced in the %SYSFUNC or %QSYSFUNC macro function is not found.'

is there any other way to get a solution??

Thanks in advance, Easwar.


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