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 07:58:19 -0700
Reply-To:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   "Choate, Paul@DDS" <pchoate@DDS.CA.GOV>
Subject:   Re: Retreiving record Counts through Macro ATTRN
Comments:   To: Easwara Moorthy <easwar_ps@YAHOO.COM>

"If" is probably what you want instead of "Where".

Paul Choate DDS Data Extraction (916) 654-2160

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Groeneveld, Jim Sent: Wednesday, June 09, 2004 6:47 AM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: Retreiving record Counts through Macro ATTRN

Hi Easwar,

WHERE is not a function and thus can not be used that way.

Regards - Jim. -- . . . . . . . . . . . . . . . .

Jim Groeneveld, MSc. Biostatistician Science Team Vitatron B.V. Meander 1051 6825 MJ Arnhem Tel: +31/0 26 376 7365 Fax: +31/0 26 376 7305 Jim.Groeneveld@Vitatron.com www.vitatron.com

My computer didn't see Venus better than I did, but I didn't see it in reality.

[common disclaimer]

-----Original Message----- From: Easwara Moorthy [mailto:easwar_ps@YAHOO.COM] Sent: Wednesday, June 09, 2004 13:00 To: SAS-L@LISTSERV.UGA.EDU Subject: Retreiving record Counts through Macro ATTRN

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