|
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.
|