SASUnit Examples  Version 1.2
_sasunit_nobs.sas
Go to the documentation of this file.
1 
19 /* change log
20  07.02.2008 AM return logical instead of physical observations
21 */
22 
23 %MACRO _sasunit_nobs(
24  i_data
25 );
26 %local dsid nobs;
27 %let nobs=0;
28 %let dsid=%sysfunc(open(&i_data));
29 %if &dsid>0 %then %do;
30  %let nobs=%sysfunc(attrn(&dsid,nlobs));
31  %let dsid=%sysfunc(close(&dsid));
32 %end;
33 &nobs
34 %MEND _sasunit_nobs;