Hello: Can someone help explain to me why this codeset returns a value of 19, instead of 9? For some reason, it's not applying my where clause as I'd expect.
%let dsid = %sysfunc(open(sashelp.class (where=(Sex="F"))));
%let Gender_NOBS =%sysfunc(attrn(&dsid,NOBS));
%let rc = %sysfunc(close(&dsid));
%put Gender Count = &Gender_NOBS;
Thanks!
From online doc:
specifies the number of physical observations (including the observations that are marked for deletion). An active WHERE clause does not affect this number.
From online doc:
specifies the number of physical observations (including the observations that are marked for deletion). An active WHERE clause does not affect this number.
I've attached a macro I use to determine the number of observations for various scenarios. Perhaps you'll find it useful. You'll have to modify it to remove the call to %parmv.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.